Image size problem

Discussion in 'Bug Reports' started by agraham, Oct 24, 2007.

  1. agraham

    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
    Code:
    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?
     
  2. specci48

    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
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    Right click on the images and choose: Properties - Summary.
    One image's resolution (garden2.bmp) is 240 and the other resolution is 96.
    This causes garden2.bmp to be drawn smaller.
     
  4. agraham

    agraham Expert Licensed User

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

    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.
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    It is probably 96 dpi. I searched MSDN documentation and I didn't find the actual number.
     
Loading...