Re: jpeg_finish_decompress: do I really need it?



scott

I think u can't comment it ... Becoz that is used mainly to FREE the
objects that r
malloced . I would also suggest u to decode it using any other decoder
(If possible)
and try re-encoding it ... but i am not sure ..
Pavan



Scott wrote:
> On Wed, 25 Jan 2006 00:44:24 GMT, "City Dweller" <city@xxxxxxxxxxx> wrote:
>
> >I use libjpeg and certain JPEG images cause it to throw an error such as
> >
> >"Invalid JPEG file structure: two SOI markers"
> >
> >I traced it to jpeg_finish_decompress. Now, when I comment it out, the
> >images still open just fine, and there are no errors anymore. So I am
> >considering commenting it out of my project for good. Does anyone know
> >if I can safely do that? Can it cause any problems?
>
> From the documentation:
>
> [quote]
> After all the image data has been read, call jpeg_finish_decompress() to
> complete the decompression cycle. This causes working memory associated
> with the JPEG object to be released.
> [/quote]
>
> Sounds like a recipe for a memory leak. I'd look for a different solution.
>
> If you rummage around in the documentation, you'll see that you can override
> libjpeg's default error handling behavior by installing your own error
> handlers. Your code can then handle the error by doing something a little
> less drastic than aborting the program.
>
> -Scott

.



Relevant Pages

  • Re: jpeg_finish_decompress: do I really need it?
    ... >I use libjpeg and certain JPEG images cause it to throw an error such as ... >images still open just fine, and there are no errors anymore. ... This causes working memory associated ... If you rummage around in the documentation, you'll see that you can override ...
    (comp.compression)
  • Re: Rudamentary CONSOLE I/O Routines for Windows
    ... "Gary L. Scott" wrote: ... It appears that the documentation is correct but I failed to correct the ... I apparently removed the differentiation between "cursor" ... > Liberty is a well armed sheep contesting the vote. ...
    (comp.lang.fortran)
  • Re: Just when you started believe the low noise myth
    ... shot camera having better noise performance then the 20D, ... recall was to pull the images from your web site. ... Scott, Scott, Scott. ... It is an established fact that low light situations like inside a church near dusk, are a situation where unsupported natural light photography remains the sole domain of leaf shutter cameras or in the case of digital, cameras with no mirror shudder and either NMOS or CCD sensors. ...
    (rec.photo.equipment.35mm)
  • Re: waffle boy
    ... : Scott W wrote: ... I don't have a formal gallery. ... know that I'm being polite when I use the word stink). ... At one point you tried to claim that the images weren't yours and that you scanned ...
    (rec.photo.equipment.35mm)
  • Re: [SLE] CUPS Broken After Recent Patch?
    ... ** Reply to message from Scott Leighton on Thu, ... but none of the images display. ... When I go to http://localhost:631 all of the links display and all work. ... I queue up a few print jobs and go to http://localhost:631/jobs all of them ...
    (SuSE)