Re: Tk::Photo->data(-format) support ?

Slaven Rezic <[email protected]>
Newsgroups gmane.comp.lang.perl.tk
Message-ID <[email protected]>
Todd Littlefield <[email protected]> writes:

> 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?
> 
> Have you tried opening an existing GIF file to see if that works with
> your version?
> 

Loading gifs is fine, it's about writing to a string.

Regards,
        Slaven 

> Slaven Rezic wrote:
> 
> >
> >No, this is a Tcl list.
> >
> >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]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.