[texhax] includegraphics and image scaling

Heiko Oberdiek heiko.oberdiek at googlemail.com
Fri Dec 10 21:10:47 CET 2010


On Fri, Dec 10, 2010 at 07:35:23AM +0100, Heiko Oberdiek wrote:

> On Thu, Dec 09, 2010 at 11:12:36PM -0500, Peter Davis wrote:
> 
> > http://www.pfdstudio.com/images/Chrysanthemum.jpg
> 
> Quick results of:
> 
> * file:
>   JPEG image data, JFIF standard 1.02, resolution (DPI), 96 x 96
> * bmpsize-test:
>   Type: jpg
>   Pixel width: 1024 px
>   Pixel height: 768 px
>   Density x: 96 dots per 72.27pt
>   Density y: 96 dots per 72.27pt
>   Width: 767.99854 bp
>   Height: 575.99863 bp
> pdfTeX:
>   770.87813pt, 578.15858pt
> XeTeX:
>   1027.83746pt, 770.87813pt
> ImageMagick 5.5.7:
>     x-Resolution: 72/1
>     y-Resolution: 72/1
>   Resolution: 96x96 pixels/inch

Analysis:

0x0000: APP0 (length 16)
  JFIF-Header
  * Unit: dots per inch
  * Xdensity: 96
  * Ydensity: 96
  * no thumbnail
0x0014: APPE (length 14)
  Adobe Application-Specific JPEG Marker
0x0024: APP1 (length 4957)
  Exif with TIFF-Header
  No resolution unit that means the default is 1in.
  XResolution: 72
  YResolution: 72
...

Conclusion: The problem is the image file itself that contains
contradictory data about the resolution. Some programs
are using 96 dpi from the JFIF header, others are using
72 dpi from the EXIF data.

Yours sincerely
  Heiko Oberdiek


More information about the texhax mailing list