I have a picture that I'd like to include in the center of the page. I don't want the picture to scale. So I tried this (among a lot of other variations):
\begin{figure}[htb]
\centering
\includegraphics{overview_pyramid.png}
\caption{Overview pyramid}\label{fg:overview_pyramid}
\end{figure}
Why isn't this working? I center the image and I don't set a specific size. Nevertheless the picture is scaled (but don't know the factor) and is on the left end of the page.
Best Answer
Your PNG probably doesn't have the correct resolution information set in its metadata. If you have ImageMagick on your system, you can run
identify -verbose overview_pyramid.png
to see the metadata of the image. If the output containsUnits: Undefined
and/or aResolution:
that is incorrect, you need to add the information.You can do this using the command
convert overview_pyramids.png -density 300 -units PixelsPerCentimeter overview_pyramids.png
to set the resolution to 300 pixels per centimetre, for instance; or justconvert overview_pyramids.png -units PixelsPerInch overview_pyramids.png
if the value of the "Density" field is correct but the unit is missing.