# libjpeg fails on jpeg_create_decompress

This topic is 4417 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

i've spent three days trying to figure this libjpeg problem out but to no avail. consider the following code that 'attempts' to READ a jpeg file:
  struct jpeg_decompress_struct cinfo;
struct jpeg_error_mgr jerr;
FILE *fp = fopen("C:\\test.jpg","rb");
if(!fp) return 1;

memset(&cinfo, 0, sizeof(cinfo));
memset(&jerr, 0, sizeof(jerr));

cinfo.err = jpeg_std_error( &jerr );
jpeg_create_decompress( &cinfo ); //<-- FAILS HERE

a few facts: 1.) the behavior is when it gets to the jpeg_create_decompress line, the entire program crashes 2.) i can write jpeg files (which uses jpeg_create_compress) with no problems 3.) i have found other threads on this very issue, but no resolution was found in those instances. 4.) my brain feels like mush... you know when you've exhausted every resource and search you can think of and come up with nothing... bleh... 5.) i might be open to other open source jpeg libraries that are free for commercial use. thanks in advance! [Edited by - fluke on November 14, 2006 7:25:36 PM]

1. 1
2. 2
Rutin
19
3. 3
khawk
18
4. 4
5. 5
A4L
11

• 12
• 16
• 26
• 10
• 44
• ### Forum Statistics

• Total Topics
633767
• Total Posts
3013739
×