Img Manual

Introduction Installation Format handlers External libraries

Introduction

Img is a Tk extension, adding support for many other Image formats: BMP, XBM, XPM, GIF (with transparency, but without LZW), PNG, JPEG, TIFF and postscript. This version only works with Tcl/Tk 8.0 or higher (any patchlevel, tested up to 8.2). If you are using Tk4.2 or lower, please stick with Img1.1.4 (which is still available).

Currently there are two identical source distributions:

 img122.zip(for Windows)(about 1.7 Mb)
 img1.2.2.tar.gz(for Unix)(about 1.5 Mb)

And a binary distribution

 img122.exe(for Windows)(about 0.6 Mb)

If you want to write images to disk which contain transparency information (e.g. GIF89 or PNG with alpha channel), a patch for Tk is needed. See the /patches/ subdirectory for more information. Without this patch only GIF87 will be written, and the alpha channel will be missing from PNG files. In other words: The background color will not be as intended but everything else should be O.K.

In stead of LZW the run-length encoding of Hutchison Avenue Software Corporation is used, also known as miGIF compression. The miGIF compression routines do not, strictly speaking, generate files conforming to the GIF spec, since the image data is not LZW-compressed (this is the point: in order to avoid transgression of the Unisys patent on the LZW algorithm.) However, miGIF generates data streams that any reasonably sane LZW decompresser will decompress to what we want.