[XeTeX] Scaling graphics

Michiel Kamermans pomax at nihongoresources.com
Sat May 1 17:01:18 CEST 2010


Ulrike,

> Well most of the graphics on my pc have either no dpi entry or 72,
> but I found one with 300dpi and this too is larger (x4) when used
> with xelatex. (it is not a graphic I can share so we can't test if
> it works for you too).

Odd... I did a minmal example with the jpg that Jose linked to, and it 
indeed becomes way too large. However, when I compare it to one of the 
graphics I use in my book 
(http://grammar.nihongoresources.com/lib/exe/fetch.php?cache=&media=gyousho.jpg 
<http://grammar.nihongoresources.com/lib/exe/fetch.php?cache=&media=gyousho.jpg>), 
running xelatex on the following code makes it look exactly as big as 
the image indicates it should be...

\documentclass{article}
\usepackage{xltxtra}
\usepackage{graphicx}
\begin{document}
\section{Figura\textunderscore 3-1.JPG}
\includegraphics{Figura_3-1.JPG}
\section{gyousho.jpg}
\includegraphics{gyousho.jpg}
\end{document}

There's two differences between the two, one in the amount of EXIF data, 
the other in the presence of a "thumbnail" encoding in my image which 
comes with its own 72dpi... now I'm wondering which image graphicsx 
actually picks up! If it picks up the 72dpi thumbnail instead of the 
300dpi actual image, that'd be a pretty severe bug in graphicx.

I'll see if I can "rig" an image so that the thumbnail looks nothing 
like the actual image, and see what the resulting pdf looks like.

> I checked the image properties with irfanview and it shows 601x601
> dpi and resolution unit "inch".
>    

I used IrfanView too, intrestingly enough I get different values now 
that I'm back home and have downloaded the jpg to this machine 
instead... Still leaves an interesting mystery.

- Mike


More information about the XeTeX mailing list