Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
2  
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
add comment

2 Answers

up vote 8 down vote accepted

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.

Examples

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

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

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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