Image dimensions in inches

Ask for help and post your question on how to use XnView Classic.

Moderators: XnTriq, xnview

Post Reply
dwdallam
Posts: 3
Joined: Fri Nov 26, 2010 9:29 pm

Image dimensions in inches

Post by dwdallam » Fri Dec 30, 2011 8:47 am

Win7 x64

Tools>Options>View: Title Bar:
<Filename With Ext> <Size auto> W<WidthInch> x H<HeightInch>:
Original file size: 11.6" x 18"
Displays as W11" x L18" (width is erroneous)

Why is that and can I fix it?

User avatar
XnTriq
Moderator & Librarian
Posts: 5407
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Image dimensions in inches

Post by XnTriq » Fri Dec 30, 2011 9:00 pm

  1. Which version of XnView are you using?
  2. Which file format(s) are we dealing with?
  3. Is Use EXIF DPI information if exists in Tools » Options... » General » Operations enabled?
[quote="frobert ([1.96] Wrong display of DPI in "Thumbnails&Details")"]More exactly: It is the optional APP0/JFIF segment that has DPI info, or "pixel densities". A JPEG file may very well contain no resolution information at all and still be compliant with the JPEG standard.
As already said, a second place where resolutions can be found is the optional APP1/EXIF segment. Strictly speaking, JFIF and EXIF are supposed to be mutually exclusive, because both standards wants their segment to be the first one. But in practice, you often find both segments, one of them necessarily in the "wrong" place.
Thirdly, the optional APP13/Photoshop IRB (Image Resource Block) segment has provision for storing resolutions.

Of course, life becomes interesting when two or more of those sources are present and disagree...

Or when a rational values found in IRB (or EXIF) segment has a null denominator... Or a null numerator...

Or when some software try to out-smart the standards : Photoshop used to (still does ?) authoritatively declares 72 dpi for JPEG devoid of any resolution information. Ditto when it deemed the resolution to be too low (<10 dpi IIRC). It also forces the X and Y resolutions to be the same...[/quote]

dwdallam
Posts: 3
Joined: Fri Nov 26, 2010 9:29 pm

Re: Image dimensions in inches

Post by dwdallam » Sat Dec 31, 2011 5:46 am

I'm using v.1.98.5
We're dealing with just JPGs.
Use EXIF DPI information is checked.

It seems like it doesn't want to calculate decimals and rounds down no matter what the decimal is. So, 11.7 would be 11. I tested this is decimal places 0.300, 0.600, 0.700. In all three instances, the number was rounded down.

User avatar
Peter2
XnThusiast
Posts: 1110
Joined: Thu Nov 24, 2005 3:07 pm
Location: CH

Re: Image dimensions in inches

Post by Peter2 » Sat Dec 31, 2011 10:01 am

Confirmed for 1.98.5, Win XP Home, TIFF.
There is also a file which has "File properties: 8,00 Inch" -> Fullscreen displays 7 Inch

Peter
XnView 2.48 German, Win 7 x64 Prof. / Win 10

User avatar
XnTriq
Moderator & Librarian
Posts: 5407
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Image dimensions in inches

Post by XnTriq » Sat Dec 31, 2011 2:00 pm


dwdallam
Posts: 3
Joined: Fri Nov 26, 2010 9:29 pm

Re: Image dimensions in inches

Post by dwdallam » Sun Jan 01, 2012 12:28 am

The problem is that it's rounding whole numbers. Not thousandths or tens.

Again: 11.6" becomes 11".

Post Reply