Re: Tk::Photo->data(-format) support ?
Slaven Rezic <[email protected]>
| Newsgroups | gmane.comp.lang.perl.tk |
|---|---|
| Message-ID | <[email protected]> |
Dean Arnold <[email protected]> writes: > (WinXP, AS 5.8.6, Tk 804.027) > I'm trying to retrieve the image data of a Tk::Photo > object. However, any -format value I specify results > in an error: > > image string format "gif" is not supported at C:/Perl/site/lib/Tk.pm line 247. > > (or "png" or "jpeg" or...) > (See small script below to illustrate) > > However, if I omit the -formt option, it returns the data as > a literal string (maybe postscript ?) No, this is a Tcl list. > of hex pixel rgb values > (which isn't terribly useful for inputting into other image > tools, e.g., GD). > > Is there something else I need to install to get the binary > gif/png/etc data back ? > jpeg and png work only if you write "use Tk::JPEG" or "use Tk::PNG". Those two formats are add-ons and not loaded by default into Tk. gif worked in 800.xxx, but not anymore in 804.xxx, probably due to this change (from Change.log): Change 3152 on 2004/02/28 by nick@llama ... Use core tk's tkImgGIF.c rather than img's imgGIF.c Downgrade GIF testing in photo.t to match core's lack of string write. (What was the cause for the change?) Other possible formats are xpm and bmp, maybe there are others, too. Regards, Slaven -- Slaven Rezic - slaven <at> rezic <dot> de tkruler - Perl/Tk program for measuring screen distances http://ptktools.sourceforge.net/#tkruler -++**==--++**==--++**==--++**==--++**==--++**==--++**== This message was posted through the Stanford campus mailing list server. If you wish to unsubscribe from this mailing list, send the message body of "unsubscribe ptk" to [email protected]