Graphics, Figures & TablesDoes latex modify image quality like word does?

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
insipidtoast
Posts: 128
Joined: Wed Jul 04, 2012 5:34 pm

Does latex modify image quality like word does?

Post by insipidtoast »

I need to convert many 72dpi, 180dpi, 200dpi, 130dpi images to 300dpi before adding them to my book when typesetting. I have heard that microsoft word sometimes changes 300dpi images to 200dpi images when you modify them within word.

I just want to make sure that when I place my jpegs within lyx, it will not affect the quality. I will probably modify the size of the images in order to fit them within the margins of the page, but I do not want the program to change the resolution or affect the quality of the printed book in any way.

Will the program modify my jpeg images in any such way?
FYI:
I'm using windows with LyX 2.0 and MiKTeX 2.9
I'm designing a book using the Koma-script class

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Does latex modify image quality like word does?

Post by cgnieder »

LaTeX does not change graphics at all but simply adds embeds it into the resulting pdf. pdflatex usually converts myimage.eps into myimage-converted-to.pdf and embeds the latter.

Have also a look at Heiko Oberdiek's excellent answer to a question with similar concerns.

Regards
site moderator & package author
insipidtoast
Posts: 128
Joined: Wed Jul 04, 2012 5:34 pm

Re: Does latex modify image quality like word does?

Post by insipidtoast »

OK, so I read that, but I still want to be absolutely clear.

When I add my image cropped to 2:3 ratio into lyx, and then resize (shrink) the image in Lyx so that it fits the margins, this DOES NOT affect the image resolution?

I.e. when I print the 300ppi image from the pdflatex document it will still look like a printed 300ppi image? This means that I DO NOT have to scale my image to the exact size BEFORE placing it into my lyx (latex) document?
FYI:
I'm using windows with LyX 2.0 and MiKTeX 2.9
I'm designing a book using the Koma-script class
User avatar
Stefan Kottwitz
Site Admin
Posts: 10350
Joined: Mon Mar 10, 2008 9:44 pm

Re: Does latex modify image quality like word does?

Post by Stefan Kottwitz »

If you just include a picture (using pdfLaTeX for compiling), it's not changed by LyX or LaTeX. The quality depends on the image resolution, the pdf viewer program and the printing process.

Don't scale or resize a bitmap image within LaTeX, to avoid a change of the image.

It's very recommendable to use vector graphics for images, because they can be scaled without quality loss. If you produce the pictures yourself, you can use for example Inkscape. If you have only bitmap data, such as jpg and png, use a high resolution, i.e. 300ppi or more.

Stefan
LaTeX.org admin
insipidtoast
Posts: 128
Joined: Wed Jul 04, 2012 5:34 pm

Does latex modify image quality like word does?

Post by insipidtoast »

Stefan,

Interestingly enough I went to a local printer and printed a few pages with test images. Here's my report posted on another internet forum:
In the following example, the original image is 72ppi and 1920 x 2560 pixels.



Today I stopped by the local printer, and printed out a few trial pages of my book with images. The last four pages were full pages with the same image, however, I applied different resizing/resampling permutations to the image.



1) When I resampled to 300ppi AND resized to the exact dimensions needed for my book in Irfanview, THEN inserted the images into Lyx as is, the quality was not good. It was easy to see jagged edges around round objects.



2) I also resized but didn't resample the same image. I resized it in Irfanview to the exact dimensions I needed, and then inserted it into Lyx. I can't tell any difference between this image and the image I mentioned in number one. Both do not look good, and they equally don't look good.



3) I resampled to 300ppi in Irfanview but did not resize. Then I inserted the image into Lyx and shrunk the image to the size I needed. The result looks good.



4) I did not resample and I did not resize in Irfanview. I simply inserted the original image into Lyx and shrunk it to the size I needed. The result looks good, and it looks equally good as the image in number three.



So, 300dpi is apparently not necessary, and it is not desirable to resize the image externally (At least if you are using Lyx).
FYI:
I'm using windows with LyX 2.0 and MiKTeX 2.9
I'm designing a book using the Koma-script class
insipidtoast
Posts: 128
Joined: Wed Jul 04, 2012 5:34 pm

Re: Does latex modify image quality like word does?

Post by insipidtoast »

I assume I should follow #3 procedure from my example for every image, but I haven't been able to get any conclusive answers. What do you think?

Every printing company is different, so do I just cross my fingers?
FYI:
I'm using windows with LyX 2.0 and MiKTeX 2.9
I'm designing a book using the Koma-script class
Post Reply