I believe this may be a bug with the png image loader. I am creating my menus and all png's that I have been working with seemed to load flawlessly. However, I decided to make a rather large overlay. The png image resolution is 1024x512.
If I try to load a bitmap or jpeg in that size, the image seems to load correctly into the gui environment. However, I replaced it with a png and now the app crashes. I do a check to see if the texture itself is loaded, it does not. It is as if the png file is not in the directory(yes it Is, so please don't say that I named it wrong or something like that. I deserve more credit than that). I have tried multiple files in multiple areas of my code.
I have also tried draw2dimage with the driver, with the same result. A check to see if the image is loaded fails. The png file is about 90kb, which I would prefer to use over the 2mb tga and bitmap files. Also to mention, transparency with png images are far easier to do than bitmaps.
Problem loading large png files?
Have you tried looking at the debug spew or stepping into the call to getImage that fails. It might give you an idea why the failure is happening.
I was able to download several png images that the loader won't load, but every one of them gives me a reaasonable error message. I had no problem loading a 1152x864 png image.
I would look into where the crash is occuring. Is it crashing because someone decided to use a null texture pointer after the image failed to load?
Travis
I was able to download several png images that the loader won't load, but every one of them gives me a reaasonable error message. I had no problem loading a 1152x864 png image.
I would look into where the crash is occuring. Is it crashing because someone decided to use a null texture pointer after the image failed to load?
Travis
i will try stepping when I get home, but the crash is due to the null pointer. I had a check to see if the pointer was true or not, but I removed it to see if the image was even being loaded (because it wasn't showing up). It crashed, I went to debug it, and it lead me to the null pointer.
I took the png that I was trying to load, cropped half out to a 512x512 image and it loaded fine. I will look into it more when I get home.
I took the png that I was trying to load, cropped half out to a 512x512 image and it loaded fine. I will look into it more when I get home.
-
- Posts: 313
- Joined: Tue Nov 01, 2005 5:01 am