[XeTeX] Scaling graphics
pomax at nihongoresources.com
Fri Apr 30 17:20:57 CEST 2010
> No, I can reproduce your problem with miktex 2.7 too.
> Your picture is 1886 pixel wide and declares its resolution to be
> 600 dpi. This gives a "natural" width of 8cm and this width you get
> with pdflatex.
> But xetex seems not to take the resolution into account but use a
> resolution of 72 dpi. This gives a "natural" width of about 66cm and
> so scaling it to 0.4 is not enough.
Hmm, that's interesting. I use images at 1180x650px at 300dpi for my
book, but these are added into the tex source without any scaling
factors, and come out at the "right" size (4"x2" approx).
So that leads us back to the jpg itsef - two things I notice about the
jpg are a different vertical and horizontal dpi (601 and 600
respectively). Although not "wrong", it is very strange, since pixels
are typicall 1:1 or 3:4 scaled... never 601:600 =) I also don't see a
"resolution unit" value set in the jpg, which could be a problem, as
that value is typically used to determine the "natural width" of a jpg
image! This value should be "2", to indicate the dpi value actually
really does apply to inches, and not some other unit of measure.
I don't have a machine with XeTeX installed on it available at the
moment, so if someone can create a new jpg in photoshop, paint.net, gimp
or anything else that will save dpi based on square pixels and sets the
resolution unit to inches when saving to jpg, it should be reasonably
simple to verify whether or not this was the problem.
More information about the XeTeX