Re: Tk::Photo->data(-format) support ?
Dean Arnold <[email protected]>
| Newsgroups | gmane.comp.lang.perl.tk |
|---|---|
| Message-ID | <[email protected]> |
Todd Littlefield wrote: > Strange thing is the Tk Widget Demo loads some gif files (earth.gif and > earthris.gif) for the > Alpha Channel Compositing demo. It doesn't specify the file type, it > just opens it: > > my $i1 = $mw->Photo( -file => Tk->findINC( 'demos/images/earth.gif' ) ); > my $i2 = $mw->Photo( -file => Tk->findINC( > 'demos/images/earthris.gif' ) ); > > Are you sure the binary data is correct? What if you tried dumping that > to a file > with a .gif extension and loading it? The issue isn't in creating a Tk::Photo, but rather retrieving the data back out of it. Having applied Slaven's comments, I further discovered the output is base64 encoded, so it also requires decoding the output. With that magic, I can grab the PNG version, and feed it directly to GD. Dean Arnold Presicient Corp. -++**==--++**==--++**==--++**==--++**==--++**==--++**== 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]