As reported in the following thread by Joseph
http://forum.thegamecreators.com/?m=forum_view&t=126356&b=1
when a non-power-of-two image is loaded without the texture flag set DBP rescales the image sizes to the next highest powers-of-two (this is standard DBP behaviour). However, if the
make memblock from image command is then used in the usual way the the new image is used with the
original image sizes. This means that the image is clipped even though the re-scaled image can be saved and used correctly in other ways.
The following code illustrates the problem: the program loads a 100x200 image and automatically rescales it to 128x256 and saves this as "memblockimage1.png". The same loaded image is then converted to a memblock and back again to an image which is then saved as "memblockimage2.png". If you compare the images you will see that the second saved version is a clipped version of the new scaled image, i.e.
make memblock from image uses the top left section of the image corresponding to the size of the original image. It should be using the new re-scaled version of the image.
Sync on:Sync rate 60
Load Image "test100x200.png",1
Make Memblock From Image 1,1
memimagewidth=Memblock Dword(1,0)
memimageheight=Memblock Dword(1,4)
save image "memblockimage1.png",1
Make Image From Memblock 2,1
Save Image "memblockimage2.png",2
Do
Paste Image 2,0,30
Text 150,10," memimagewidth: "+Str$(memimagewidth)+" memimageheight: "+Str$(memimageheight)
Sync
Loop
A test image is attached - but any non-power of two image will give the bug.
[Edit: corrected link.]