Re: jpeg_finish_decompress: do I really need it?
- From: npavankumar@xxxxxxxxx
- Date: 29 Jan 2006 00:22:09 -0800
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
.
- References:
- jpeg_finish_decompress: do I really need it?
- From: City Dweller
- Re: jpeg_finish_decompress: do I really need it?
- From: Scott
- jpeg_finish_decompress: do I really need it?
- Prev by Date: Re: QI and MQ Coder: First real-life experiences
- Next by Date: Re: Still on the Arithmetic coder
- Previous by thread: Re: jpeg_finish_decompress: do I really need it?
- Next by thread: Re: Chroma Subsampling [Was: JPEG decoding]
- Index(es):
Relevant Pages
|
|