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