I have been testing making memblocks from images (JPG, PNG, and BMP images). I then make an image from that memblock and save that image to determine if there are any differences between the saved memblock image and the original image.
On one computer there are no differences between the images, however, on three other computers using the same resolution, there are the exact same differences (they are all elongated, vertically and horizontally). The result is an image of the same pixel size, but not the complete image. I have attached the code I use for the test and zipped file of the original image and the memblock created image showing the difference.
I have not yet located a discussion of this particular issue on the forum, but may not have looked far enough in the past. Please test the code and let me know your results. Is the memblock created image identical to the original or not? Also, if anyone can help me with a solution to ensure that the memblock created image will always be identical to the original image, please pass that on.
Thank you for your assistance.
REM Project: Testmemblockimage
REM Created: 3/21/2008 8:25:08 PM
REM
REM ***** Main Source File *****
REM
Sync on:Sync rate 60
Flush Video Memory
Repeat: Sync : Until Screen Invalid() = 0
wait 500
Set Display Mode 800,600,32
screenhigh= Get Display Height():screenwide= Get Display Width()
Load Image "worldmaptest.jpg",1
Make Memblock From Image 1,1
membytes=Get Memblock Size(1)
memimagewidth=Memblock Dword(1,0)
memimageheight=Memblock Dword(1,4)
Make Image From Memblock 2,1
Save Image "memblockimage.jpg",2
Delete Image 1
Do
Paste Image 2,0,30
Text 0,10,"Screen Height: "+Str$(screenhigh)
Text 150,10," memimagewidth: "+Str$(memimagewidth)+" memimageheight: "+Str$(memimageheight)
Sync
Loop