For Programmers: Free Programming Magazines  


Home > Archive > Compression > September 2006 > in memory jpeg destination and source managers









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author in memory jpeg destination and source managers
chhenning@gmail.com

2006-09-05, 6:55 pm

Hi there, I have a problem with my own jpeg destination and source
managers. My goal is to compressed a jpeg buffer from an rgb buffer.
And also the vice versa. The compressed buffer created by the
destination manager starts with FFDB ( the quantization table ) rather
than with FFD8 ( Start of image ). When I try to get to my rgb buffer
the application crashes when calling jpeg_read_header.

I think the compressed buffer has all the necessary sections, but they
are ordered somehow in a weird way. Is that normal?

If you are interessted in the source code ( C ), let me know.

Thanks ahead,
Christian

chhenning@gmail.com

2006-09-05, 6:55 pm

OK, I could figure it out. I was calling jpeg_write_tables and this
call was adding the tables to my buffer a bit to early. It's better to
omit jpeg_write_tables and to call jpeg_suppress_tables(&cinfo, FALSE).
Then the first call to jpeg_write_scanlines will add the tables.

Christian


chhenning@gmail.com wrote:
> Hi there, I have a problem with my own jpeg destination and source
> managers. My goal is to compressed a jpeg buffer from an rgb buffer.
> And also the vice versa. The compressed buffer created by the
> destination manager starts with FFDB ( the quantization table ) rather
> than with FFD8 ( Start of image ). When I try to get to my rgb buffer
> the application crashes when calling jpeg_read_header.
>
> I think the compressed buffer has all the necessary sections, but they
> are ordered somehow in a weird way. Is that normal?
>
> If you are interessted in the source code ( C ), let me know.
>
> Thanks ahead,
> Christian


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com