logo       
Google Custom Search
    AddThis Social Bookmark Button

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

Subject: Re: Tk::Photo->data(-format) support ?
Todd Littlefield <t.littlefield@xxxxxxxxxxx> 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 majordomo@xxxxxxxxxxxxxxxxxx




Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>