Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I created a PNG file (763px by 600px at 72DPI) from a free image. I opened the image in GIMP and changed the DPI to 300 and saved it. After including it in a LaTeX file with

\includegraphics[scale=1.0]{file.png}

and running pdflatex, the image looked good on the page. I wanted it a little bit larger, so I changed the DPI in GIMP to 600 and saved the file. After recompiling the source, the image is now much smaller on the output PDF. What have I done wrong?

share|improve this question
5  
dpi stands for dots per inch, so it's the pixel density (or "resolution"). Changing the dpi does not change the number of pixels, it's always 763x600. At 300 dpi, your image takes up 2.54in x 2in (763 dots / 300 dots per inch), at 600dpi it only takes up 1.27in x 1in (763 dots / 600 dots per inch). What you should do, instead of setting the resolution in GIMP, is to say \includegraphics[width=4in]{file.png}. This specifies the desired width, independent of the image resolution. –  Jake Dec 17 '12 at 14:48
    
Thanks for the explanation. Changing the image to 150 DPI increased the size of the image in the PDF. Edit: I'll try the additional suggestion you just made in your updated comment too. –  SabreWolfy Dec 17 '12 at 14:51

1 Answer 1

up vote 9 down vote accepted

The DPI measure the displayed number of Dot Per Inch. If you increase the DPI, it is normal that your picture dimensions will decrease at the same scale.

You do not need to change the DPI, you should insert your image like this:

\includegraphics[width=Xcm]{file.png}

to have a picture of a width equal to Xcm (height automatically adjusted, or height=Xcm). Or:

\includegraphics[width=Xcm,height=Ycm,keepaspectratio]{file.png}

to have an image of X by Y cm, with respect to proportion.

The DPI matter is important in that way: if you have a picture of 1in x 1in at 100 DPI (ie 100px x 100 px), the scaling to 6in x 6in will not look good...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.