[Image-SIG] Canvas with PhotoImage

Fredrik Lundh fredrik@pythonware.com
Fri, 27 Nov 1998 12:08:46 +0100


Rob Hooft wrote:
> FL> IIRC, the "dash" patches to Tk addresses this problem. You can
> FL> probably find them via the resource section on www.scriptics.com.
>
>You did recall correctly, and it does exactly what I want. Converting
>each 1.5M image to ppm afterwards is a bit slow, so I might go to
>another solution in due time, but for now it is good enough.

FYI:

----- Original Message ----- 
From: Jan Nijtmans <Jan.Nijtmans@wxs.nl>
Newsgroups: comp.lang.tcl
Sent: den 27 november 1998 08:02
Subject: Re: Tk and gif


>Paul Batten wrote:
>> I know that Tk has an option to generate postscript output from a canvas
>> widget.  Does anybody know if its gif-handling capabilities extend to
>> generating gif-ouput files of a canvas ??
>
>This is possible with Img1.2a1 as a two-step process: First turn
>the canvas into a photo, and then write it as GIF image:
>
>     package require Img 1.2
>     update   ;# we must be sure that the canvas is complete redrawn
>     # .c is the canvas we want to convert to a gif
>     set img [image create photo -format window -data .c]
>     $img write canvas.gif -format gif
>
>Currently this only works on UNIX, but Img1.2a2 (to be released
>in december) will support it for Windows as well.
>
>Hope this helps,
>-- 
>Jan Nijtmans, CMG Arnhem B.V.
>email: Jan.Nijtmans@wxs.nl (private)
>       Jan.Nijtmans@cmg.nl (work)
>url:   http://home.wxs.nl/~nijtmans/