tags:

views:

364

answers:

4
+1  Q: 

LaTeX images

Hi, I'm writing a report and inserting a few raster images in (in PNG format) using:

\usepackage[pdftex]{graphicx}

\includegraphics[width=4in]{poker.png}

My problem is that when saving as a PDF the images are look really awful, am I missing something?

Cheers!

+1  A: 

Are you viewing the PDF in original size? And is the image included in the document in it's original size? Resizing the image can result in awful images.

Mnementh
I'm using adobe pdf viewer, and viewing at 100%.
+6  A: 

I do the exact thing all the time, and it always looks good.

Perhaps it is the pdf viewer that renders it badly? (I use xpdf mostly.)

Maybe you can post screenshots of the image, and how it looks in the pdf document?

BlackShift
Here is the PDF:http://loljdawson.googlepages.com/LaTeX1.pdf And here is the source png:http://loljdawson.googlepages.com/poker.pngFollowed by the TEX:http://loljdawson.googlepages.com/LaTeX1.texThanks for the help :)
If I view the pdf at 100% (with xpdf), I can't visually distinguish the original image from the one in the pdf. Let me see whether I can post an image as well.
BlackShift
http://www.astro.rug.nl/~buddel/meuk/pokerfaces.png
BlackShift
Strange, looks O.K for you and good on my Macbook - but under Windows looks poop. Thanks for your help!
Well, the resolution is way too low for printing at this size on paper, but otherwise it looks like the png file here.
Damien Pollet
+1  A: 

I've always had the same problem, but the print is always fine. The only solution I know is to use vectorial images, but it's not always possible.

To me the problem juste comes from the fact the PDF viewer scales the image badly. There are often strange things like this, for example some capitals look wrong with Adobe's viewer, but once it's printed the result is always fine.

(You don't need to put the .png extension in the file name: graphicx automatically looks for the image with that name which has the best quality.)

Bastien Léonard
After reading blackshift's answer, I've recompiled one of my documents without resizing the image (so no [width=...] parameter), and it actually works! (With xpdf, at 100%. With Evince it's still ugly.)
Bastien Léonard
+1  A: 

Years ago I had similar problem. The solution was to use directly pdflatex, instead of latex and dvipdf.

Alternative was to convert PNG to EPS.

vartec