[XForms] Re: JPEG/EXIF support?
Angus Leeming
angus.leeming at btopenworld.com
Fri Nov 28 04:16:22 EST 2003
On Friday 28 November 2003 1:37 am, Clive A Stubbings wrote:
> Hi Angus,
>
> I built the original fix a long time ago, possibly on one of the really
> early open releases. It is always possible that it has been subsequently
> fixed elsewhere.
>
> The old flimage_dup did
>
> FL_IMAGE *
> flimage_dup_(FL_IMAGE * sim, int pix)
> {
> ...
> FL_IMAGE *im = flimage_alloc();
> ...
> memcpy(im, sim, sizeof(*im));
>
>
> Which seems a bit iffy.. I've just checked - thats is also how it is
> in 1.0. Can you check the current version?
Sigh! Yes, it still does. However, it goes on:
memcpy(im, sim, sizeof(*im));
/* reset all pointers */
im->red = im->green = im->blue = im->alpha = 0;
im->red_lut = im->green_lut = im->blue_lut = im->alpha_lut = 0;
im->gray = 0;
im->ci = 0;
im->red16 = im->green16 = im->blue16 = im->alpha16 = 0;
im->packed = 0;
im->wlut = 0;
im->llut[0] = im->llut[1] = im->llut[2] = 0;
im->extra_io_info = 0;
im->info = 0;
There are actually a heap more pointers that these defined in the struct, but
I guess that it's here that we should reset the fpin and fpout pointers, no?
Regards,
Angus
More information about the Xforms
mailing list