Advertisement

Loading a JPEG from memory

Started by March 04, 2001 07:29 PM
1 comment, last by Maxxes 23 years, 10 months ago
I''ve been using a function to read JPEG''s from disk using intel''s library with succes. Lately I tried modifying this function to read JPEGs from memory. I''ve made a custom resource containing the JPEG but i doesn''t work.
  // initize ijl

jerr = ijlInit(&jcprops);
if (jerr != IJL_OK)
   return FALSE;

// read JPEG properties

jcprops.JPGBytes = (unsigned char *)pJPG;
jerr = ijlRead(&jcprops, IJL_JBUFF_READPARAMS);
if (jerr != IJL_OK)
   return FALSE;  
after the ijlRead call jerr contains IJL_INVALID_JPEG_PROPERTIES. I''ve checked that the memory pointed at by pJPG contains exactly the same information as the jpg file on disk. Anyone knows what is going wrong?
Nobody has any clue?

Well stop bashing those newbies then
Advertisement
Haven''t used the intel lib''s yet-

but you could try the Jpeglib 6b (or newer maybe?)...

http://www.ijg.org

There''s a link to the Independent JPEG Group''s site...

Hope this helps,
Jason



ill-lusion.com

ziggy@ill-lusion.com
laxdigital.com
[email=ziggy@laxdigital.com]ziggy@laxdigital.com[/email]

This topic is closed to new replies.

Advertisement