So, lets say I have the chance to choose which file extension I want for my figure/graphic/picture that I want to include in my work.

I went over How do I insert an image in LaTeX so it looks good on print?, but I wanted to know if this still applies for nowadays, and specially if given the chance to select the extension at the source... and if this also applies for electronic pdf documents (i.e., not printed)

Which one should I choose that brings the best results?

PS: This question has very nice complementary information:

Which graphics formats can be included in documents processed by latex or pdflatex?

  • 4
    I'am not sure I understand this question: It is not the extension, but the format (vectorized vs rasterized) that defines the quality. Both PDF and EPS can contain vector/raster images. (If, for instance, you scan some image into a PDF file, the extension is .pdf, but it's a raster graphics). The only crucial point is bitmap images and the difference between lossles PNG and loosy JPEG. See this question for the glory details. – Daniel Oct 2 '13 at 12:14
  • If you havn't read this (you then should) question by Werner: tex.stackexchange.com/questions/72930/… By utilizing that you can have all image formats and switch between them, quite easily! :) – zeroth Oct 2 '13 at 12:16

This is what I recommend:

  • Choose PDF format for drawings and material that is already vectorised (typical diagrams and simple drawings)
  • Choose PNG for anything which is not vectorised but has fine details that should be exactly reproduced such as screenshots (it's looseless and therefore no artifacts will appear)
  • for pictures/photos choose JPEG

I work with pdflatex.


Here's a photo. As JPEG it is about 140 KB and as PNG it is about 1200 KB. You cant't tell the difference:

JPEG enter image description here

PNG enter image description here

The next picture is a screenshot. As PNG it is clear - every pixel is exactly correct. The PNG size is 41 KB. The JPEG (I used a high compression obviously) is only 10 KB but you get artifacts. A PNG file will not loose information unless you change the resolution.

PNG enter image description here

JPEG (high compression) enter image description here

  • 1
    Can you tell a reason for not using PNG for photos? – Benedikt Bauer Oct 2 '13 at 13:31
  • 3
    @BenediktBauer PNG is more for pictures with “discontinuous” changes in colors. – egreg Oct 2 '13 at 14:12

I use EPS for vectorized images. That way I can do manual editing in corel draw more easily than with PDF. Using epstopdf library will compile the EPS into PDF anyway

Your Answer

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

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