[Tex/LaTex] PNG DPI and image size

graphicspdfpng

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?

Best Answer

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