[XeTeX] Scaling graphics

Ulrike Fischer news3 at nililand.de
Sat May 1 16:29:20 CEST 2010


Am Fri, 30 Apr 2010 08:20:57 -0700 schrieb Michiel Kamermans:

>> 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).

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).



> 
> 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! 

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



-- 
Ulrike Fischer 



More information about the XeTeX mailing list