[XForms] Re: JPEG/EXIF support?
Clive A Stubbings
xforms2 at vjet.demon.co.uk
Wed Nov 26 21:27:21 EST 2003
> > It probably needs massaging to work on the latest CVS. It fixes a bug in
> > flimage_dup() ,
> I'm not going to apply this without some discussion. Feel free to explain the
Well, its a while ago, but if memory serves, I found that if I dup'd an
image then later free'd both copies I got a crash. The crash was because
the first free also closed the files and the second one tried to do the
same again, but the fp's were no longer valid.
There needs to be only one reference to the fp.. Either it goes in a
shared struct that both 'images' point to, or only one image can be
associated with the file. I'm not sure that 2 'images' and one file
really makes sense anyway.
FWIW: I duped the image because I wanted to have the original and a
processed copy, so I made a dup and then processed it.. When I'd
finished with both images I free'd both.. Seemed reasonable to me.
> > one in image rotate.
> I don't see the need for this. See the comment immediately preceeding your
> patched code. In cvs at least.
> * Now coerce it into +/- 180.
You're right - this one was broken in the 1.0 candidates and fixed in 1.0..
> > and makes jpeg + gif reading better.
> I've applied both these parts to my local tree, albeit with some re-factoring
> to get rid of the goto and some signed-unsigned comparson warnings. Could you
> check to see that all is still as you intended (attached). If you could cast
> your eye over the ChangeLog entry and maybe rename 'flush_buffer' to
> something that makes sense to you, that'd be great too...
Had a fair look at it - seems OK on paper. flush_buffer is fine. The
function flushes completed lines from the working buffer.
(If you don't like the goto, with hindsight, an else might have been better ;-)
More information about the Xforms