1img-gif(n) Img img-gif(n)
2
3
4
6 img-gif - Img, Graphics Interchange Format (gif)
7
9 package require Tk
10
11 package require img::gif ?1.4?
12
13 image create photo ?name? ?options?
14
15
17 The package img::gif is a sub-package of Img. It can be loaded as a
18 part of the complete Img support, via package require Img, or on its
19 own, via package require img::gif.
20
21 Like all packages of Img it does not provide new commands, but extends
22 the existing Tk command image so that it supports files containing
23 raster images in the Graphics Interchange Format (gif). More specifi‐
24 cally img::gif extends Tk's photo image type.
25
26 The name of the new format handler is gif. This handler provides new
27 additional configuration options. See section GIF OPTIONS for more
28 detailed explanations.
29
30 All of the above means that in a call like
31
32 image create photo ?name? ?options?
33
34 [1] Image data in gif format (options -data and -file) is detected
35 automatically.
36
37 [2] The format name gif is recognized by the option -format. In
38 addition the value for the option is treated as list and may
39 contain any of the special options listed in section GIF
40 OPTIONS.
41
43 The handler provides two options, one for reading from a GIF image, the
44 other influencing the writing of such.
45
46 -index n
47 This option is for reading from GIF files containing more than
48 one image (animated GIF's, GIF movies. When specified it will
49 read the n'th image in the data. The first image is at index 0
50 and will be read by default, i.e. when the option is not speci‐
51 fied.
52
53 -interlaced bool
54 If the value of this option is set to true the image will be
55 written using the interlaced sub-format of GIF. The default is
56 to write non-interlaced files. This option is not implemented
57 yet.
58
60 Instead of LZW the run-length encoding of Hutchison Avenue Software
61 Corporation is used, also known as miGIF compression. The miGIF com‐
62 pression routines do not, strictly speaking, generate files conforming
63 to the GIF spec, since the image data is not LZW-compressed (this is
64 the point: in order to avoid transgression of the Unisys patent on the
65 LZW algorithm.) However, miGIF generates data streams that any reason‐
66 ably sane LZW decompresser will decompress to what we want.
67
69 If you want to write images to disk which contain transparency informa‐
70 tion (e.g. GIF89) you need at least Tk 8.3.
71
73 img-bmp, img-dted, img-gif, img-ico, img-intro, img-jpeg, img-pcx, img-
74 pixmap, img-png, img-ppm, img-ps, img-raw, img-sgi, img-sun, img-tga,
75 img-tiff, img-window, img-xbm, img-xpm
76
78 gif, image handling, tk
79
81 Copyright (c) 1995-2009 Jan Nijtmans <nijtmans@users.sourceforge.net>
82
83
84
85
86img-gif 1.4 img-gif(n)