Incorrect Height of Pixmap BUG

Archives Forums/BlitzMax Bug Reports/Incorrect Height of Pixmap BUG

Ked(Posted 2009) [#1]
Hey. I'm loading a 96x160 pixel PNG pixmap. When I use PixmapWindow() on anything greater than or equal to 128 pixels vertically, I get a Pixmap coordinates out of bounds error. So, I use PixmapHeight() to check the height and it returns 128 instead of 160.

I really need a fix for this quickly for a project I'm working on. I can't go any further in my programming until this is corrected.

Thanks!


marksibly(Posted 2009) [#2]
Sample code?


Ked(Posted 2009) [#3]
Sorry.

SuperStrict

Global pixmap:TPixmap=LoadPixmap("pixmap.png") 	'96x160
Print "WIDTH: "+pixmap.width					'96
Print "HEIGHT: "+pixmap.height				'128

Local pix:TPixmap=PixmapWindow(pixmap,0,128,32,32)	'ERROR HERE
SavePixmapPNG(pix,"nope.png")



Ked(Posted 2009) [#4]
Holy cow. :P

So... it's a funny story...

It's my fault.

In my game I have all of my images stored in a single DAT file and when the game starts it dumps all of the images into the required folders. Well, idiot me forgot to update the image DAT file with my new 96x160 image (which was originally 96x128).

So, in conclusion, I need to pay closer attention to what I'm doing. :)
Sorry again for this inconvenience.


TaskMaster(Posted 2009) [#5]
So you wrote that sample code to prove the error and never actually ran it? Just assumed the error would be there again?

Ouch...


Ked(Posted 2009) [#6]
No.

I ran it and discovered the error wasn't there. So I had to figure out what I'd done. I found it though, obviously.