Saving a .png that is bigger than the screen
BlitzMax Forums/BlitzMax Beginners Area/Saving a .png that is bigger than the screen
| ||
This was easy in Blitz Basic. Not sure if it is here, because you can't copy buffers, you have to draw everything to the screen. So you have to draw it to use setscale (i want to shrink or expand the png) - but it is too big for the screen, so you can't save the area that isn't drawn to the screen! Or can you? Is there a way around it (such as copying from the loaded graphic without drawing it to the backbuffer, but scaled differently)? |
| ||
"such as copying from the loaded graphic without drawing it to the backbuffer, but scaled differently" -- try this:Local myPixmap:TPixmap = LoadPixmap( "... .png" ) Local scaleX:Float = 2.0 '200% increase. Local scaleY:Float = 1.5 '150% increase. Local newWidth:Int = Int( myPixmap.width * scaleX ) Local newHeight:Int = Int( myPixmap.height * scaleY ) Local scaledPixmap:TPixmap = ResizePixmap( myPixmap, newWidth, newHeight ) SavePixmapPNG( scaledPixmap, "... .png", 9 ) |
| ||
I sure love programming! Its like having Gods power. |
| ||
Thanks K - i'll give that a try. Resizepixmap - must have missed that. Mind you, there are so many more commands to max... |