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

\caption{A simple caption}

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
    Commented Aug 3, 2014 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
    Commented Aug 5, 2014 at 13:51

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

You must log in to answer this question.