Image size problem

agraham

Expert
Licensed User
I'm not too good a drawing/image stuff and I can't see the problem here so I don't know if it is some sort of bug or not.

In the attached zip file are two nominally identical bmp files made in Paint Shop Pro XI and a screen shot showing that when I display them with this code
B4X:
Sub Globals
   'Declare the global variables here.
   BmpFile1 = AppPath & "\Garden.bmp"
   BmpFile2 = AppPath & "\Garden2.bmp"
End Sub

Sub App_Start
   Form1.Show
   Form1.DrawImage(bmpfile1,0,0)   
   Form1.DrawImage(bmpfile2,100,100)
End Sub
Garden2.bmp is drawn 2.5 times as small as it should be. Changing the order of drawing and their locations makes no difference. Other apps like ACDSee, Paint, Windows Gallery etc. display them the same size as each other.

Does anyone know what's happening here?
 

specci48

Well-Known Member
Licensed User
There must be something wrong with your saving options.
I took your .bmp files, opend them with IrfanView and saved them again as a .bmp file format (with different names). These newly saved .bmp files work fine, they both have the same size!


specci48
 

agraham

Expert
Licensed User
Ah! Thank you Erel,so that's it! The ratio of resolutions explains the 2.5 times difference.

Right click on the images and choose: Properties - Summary.
Vista doesn't give that detail in Properties->Details but I checked in Paint Shop Pro.

I had interpreted the phrase "original size" in the help to mean the actual bitmap size. For the record - and to be pedantic - can you confirm that to get a drawn bitmap sized to the actual bitmap size the resolution needs to be set to exactly 96 ppi? I assume there is no way of overriding this apart from editing the bitmap properties.
 
Top