IMG_LoadPNG_RW failing in setjmp?

Hi
i am trying to load a png from memory using sdl_image,
(from file the load works well),
but it fails in the IMG_LoadPNG_RW ():

if ( setjmp(png_ptr->jmpbuf) ) {
error = “Error reading the PNG file.”;
goto done;
}

Do you know what does it mean?

I am using sdl sdl image 1.2.10.

(note that bmp and jpg works fine either from file loading or memory loading, only the png fails, in this setjmp … no idea why, is this a sdl image bug ?

thanks

Usually that means that the image is malformed for some reason. Can
you debug into the PNG library? Or even more simply, can you dump out
the memory to a file and load it using some other program?On Fri, Jan 29, 2010 at 2:48 AM, Tiresias wrote:

Hi
i am trying to load a png from memory using sdl_image,
(from file the load works well),
but it fails in the IMG_LoadPNG_RW ():

if ( setjmp(png_ptr->jmpbuf) ) {
error = “Error reading the PNG file.”;
goto done;
}

Do you know what does it mean?

I am using sdl sdl image 1.2.10.

(note that bmp and jpg works fine either from file loading or memory
loading, only the png fails, in this setjmp … no idea why, is this a sdl
image bug ?

thanks


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and President, Galaxy Gameworks LLC

hello
the point here is that a SLD_LoadImage (from_file) with the same PNG works perfectly … and i have another piece of code which is able to load it from memory without any problem.
so its not a matter of malformation,
but thanks anyway,
i guess the sdl image lib is buggy.