Hi. Ive been having a go at writing my own dupe detector in VB6. Alls going well until my app hits a PNG file that has a res of 10000 x 7457 x 32.
The code fails inside the VB6 wrapper function \'Freeimage_LoadEx\' when the function\'s built-in error trap triggers. Looking at the code it seems the error is raised if the call to Freeimage_Load returns NULL, which is happening in the case of my test image and the original.
I then try to recreate the bug with a new image. Same dimensions, same format. I get a completely new bug. In my app I convert the loaded image to 32bpp for processing (if it isn\'t already) and I find that Freeimage_ConvertTo32Bits is returning NULL.
Freeimage_GetBpp was reporting that my test image was only 24bit while the original was 32 so I compared my test image with the original and I find that the original has a mask while my test image didn\'t. I added it and the original bug returned.
This bug was occurring with 3.14.1 and 3.15.1
Test image : http://www.jcomcp.plus.com/test.png
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Just tested it again by converting the PNG to a BMP. It fails at 'Freeimage_ConvertTo32Bits' again.
Hi,
This image is a 32-bit image with a size of ~ 284.5 MB.
I have no problem loading it, so you problem is probably related to your memory.
Maybe there's a limitation in VB6 with the memory you can allocate.
Note that you can use FreeImage_SetOutputMessage to catch error messages.
Hervé
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
After force feeding myself C I have to agree with you. After translating my VB code to C I have no problems with those images. However I have found another bug pertaining to 3.15.1. I'l open a fresh bug for it.
BTW, my error handler set with FreeImage_SetOutputMessage does not respond to the original bug. The mentioned functions just fail silently and return NULL without calling the error handler. Other errors work. I was getting other loading related messages (usually JPEG file related) properly.
closed with release 3.16.0