0

I am trying to include images into my latex code. I use the following code:

\begin{figure}[ht!]
\centering
\includegraphics[width=90mm]{fixed_dome1.png}
\caption{A simple caption}
\label{overflow}
\end{figure}

In the preview it comes out nicely. But when I export document to a pdf, the image gets blown up like this:

enter image description here

What is going wrong? I am using Latexlab.org for my project.

  • 1
    Welcome to TeX.SX! Your post was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. About your question: PNG files are bitmap, so they can't generally be zoomed in without that effect. – egreg Aug 3 '14 at 12:47
  • 1
    Exactly what do you mean by looks fine in preview but wrong when exporting to PDF. Exactly how are you compiling this? – daleif Aug 5 '14 at 13:51
1

It might help to examine the metadata in your png image. Not all the LaTeX magic that produces your output looks in the same place for the resolution of the image. (I have seen something similar using jpgs where EXIF and JIFF sections of the metadata report 72 and 300 dpi for the same image) One part of the process makes a tiny space for the image and the other works out the dimensions from the lower resolution. Try exiftool--it's available for OS X and Linux-- that lets you clean up your metadata without messing with the image.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy