PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

CreateSurface() never returned...

Hi,

I made a mistake today by renaming a Paintshop Pro (PSP) image with a PNG extension. When I tried to use the CreateSurface() function to load the image, it never returned.

This is not a big deal, but maybe the function should return an error message instead of doing nothing.

I'm not using the latest version. This happened with the current evaluation version.

--Eric
It could be that the CreateSurface function was still trying to load the image file (or allocate memory for it). It may have read the image size in (obviously incorrect values) and was trying to allocate a gig of memory for it.
That would be a bad thing. Shouldn't GapiDraw check the beginning of the file to make sure that a png is actually a png?