>
>
>
> If someone will show me how to start I would
> be happy to do it and contribute it to the larger cause.
> Michael
>
>
> On Tue, 4 Jun 1996, Arturo Perez -- Software Engineer wrote:
>
> > Anyone out there know of any Tk code for displaying jpegs
> > and progressive jpegs? Preferably in the form of a Tk photo
> > widget...
> >
> > -arturo
> >
> > --
> > ----
> > Arturo Perez arturo_at_infonautics.com
> > Too much information, like a bullet through my brain - The Police
> >
> >
The process is so straightforward I am surprised somebody
hasn't done it already. Perhaps they have but the Tcl archives are
such a disorganised rabble it is hard to tell.
The photo widget stuff in Tk4+ is designed to be extensible. To add
an image type one simply has to write a set of functions which conform
to a set of template prototypes defined in tk.h (see
Tk_PhotoImageFormat). These functions perform the tasks of format
identification, reading and writing. Note that read and write from
both files and strings is supported but only a subset of these need be
implemented. Pointers to the functions (or NULL if unsupported) are
packed into the structure mensioned above which is then used as the
argument to the function Tk_CreatePhotoImageFormat. The call to this
function can be placed anywhere: userinit.c or STk_Init_<your_stuff>
for example.
Having done all that the new image file or data (string) type will be
automagically identified and read when passed as an argument to (image
'create ...). The existing tkImgFmt*.c files serve as good templates
and with the abundance of JPEG library code your task should be fairly
straightforward...
Hope this helps,
--
------------------------------------------------------------------------------
Mr Andrew Dorrell
School of Electrical Engineering *
University of Technology, Sydney *
PO Box 123 *
Broadway NSW 2007 .
AUSTRALIA
* /---\ Whoo?
Phone: 61 2 330 2395 (o o) /
Fax: 61 2 330 2435 ( : )
email: andrewd_at_ee.uts.edu.au ^ ^
OR dorrell_at_ihf.uts.edu.au
------------------------------------------------------------------------------
Received on Thu Jun 06 1996 - 02:56:21 CEST