Version 14 of photo

Updated 2008-12-18 03:09:51 by GraemeP

http://www.tcl.tk/man/tcl8.4/TkCmd/photo.htm

A photo image is the means that Tk uses to display full color images. Tk comes with support for GIF, PPM, and PGM formats, as well as a format to hook in code for other formats. The Img extension provides additional full color image formats.

Photo image rotation - Image scaling


DKF: Although Tk can't load images with rich alpha channels (i.e. non-trivial transparency effects like you get with some PNG images) it can display them from 8.4 onwards.

LV: Is the distinction between load and display that you make here a difference between minimally displaying the content versus displaying the content with the transparency effects?

DKF: No. Load is the process of getting the image data created in memory from a file, and display is the putting of the image on the screen (including all transparency effects, if they're present).

LV: Okay (it might be good to add that distinction to the man page). So, how does Tk 8.4 and on display PNG files if it can't load them? Or do you mean that Tk 8.4 can now load PNG images - just not the advanced ones?


LV I see a recent update to the Changes in Tcl/Tk 8.6 page says that Tk 8.6 is going to support LZW compressed files. Does this mean that the patents for LZW have finally expired?

DKF: According to Wikipedia[L1 ], it expired in 2003. We're now 5–6 years later, we're supposed to be able to make use of the algorithm now, that's the whole point of the way patents work.

GraemeP: IBM also had a patent on the algorithm that expired in August 2008, so its less than 3 years later (see GNU page about GIF images [L2 ] and Cygwin mailing list [L3 ])