Announcement

Collapse
No announcement yet.

V4.25: Incorrect size of emf files

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Reported V4.25: Incorrect size of emf files

    It looks like IrfanView always shows the wrong size of emf files. I have attached an example emf file in a zip archive, but I think it is a problem with all emf files.

    The attached emf file is opened as 638x359 by IrfanView but the Windows Properties show that it is 640x360.

    If you look at the ENHMETAHEADER record in the file you can see this:
    rclFrame={0,0,17195,9557}
    sclDevice={1152,864}
    sclMillimeters={310,230}

    From this we can calculate the position of the pixel at the bottom right corner to be:
    x=17195*1152/310/100=638,9883
    y=9557*864/230/100=359,0107

    It is obviously from this IrfanView got the size 638x359, but instead of always rounding down it should round to the nearest integer, so the position of the bottom right pixel is (639,359). As the top left pixel is at (0,0) the size of the image becomes 640x360. IrfanView forgets to add 1 to the pixel position to get the size.

    I am using IrfanView 4.25 on Windows XP.
    Attached Files
Working...
X