LaTeX forum ⇒ Graphics, Figures & TablesAnti-Aliasing of EPS Figures

Information and discussion about graphics, figures & tables in LaTeX documents.
fmwyso
Posts: 3
Joined: Thu Jul 21, 2011 4:51 pm

Anti-Aliasing of EPS Figures

Postby fmwyso » Thu Jul 21, 2011 5:04 pm

I don't really have an example, I tried looking for the answers but couldn't easily.

Essentially, my goal is to make my EPS figures look better than what they do when I open it in the Latex compiled PDF. Gimp shows my EPS figures looking way better because I set anti-alias on; I want to enable that in my PDF and hopefully not just on my own reader. Just for reference, I am only using PDFLaTeX; if this feature requires me to change then please recommend the best (I am hoping I don't have to go through that hassle just for anti-aliasing :P).

  • If I compile an EPS figure into a PDF file using Latex, does it remain a vector image?
  • If it doesn't, is there any way to turn on anti-aliasing? My graphs are simply really ugly because the lines aren't anti-aliased.
  • If it remains a vector, what makes it get displayed as anti-aliased in Acrobat Reader?

Thank you for your time!

-- Edit --

I have achieved success, for some reason, using Distiller to convert my dvi file to pdf. Same exact dvi / ps file using the same exact methods yet Distiller actually gets the output pdf to anti-alias the figures.
Last edited by fmwyso on Tue Jul 26, 2011 5:42 pm, edited 1 time in total.

User avatar
shadgrind
Posts: 140
Joined: Thu Jul 16, 2009 12:39 am

Postby shadgrind » Fri Jul 22, 2011 3:11 am

Try the latex --> dvi --> ps --> pdf route to see if it makes a difference:

  1. latex your_file.tex
  2. dvips -Ppdf -G0 -z your_file.dvi
  3. ps2pdf14 -dPDFSETTINGS=/printer your_file.ps
System: TeX Live 2012, Fedora 18 x86_64, GNU Emacs 24.2

User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am
Location: Amherst, MA

Postby frabjous » Fri Jul 22, 2011 3:49 am

What exactly is your workflow for including EPS in a LaTeX PDF? Are you using pdflatex and converting with epstopdf or what?

It should remain as a vector image unless you're using a nonstandard workflow.

Antialiasing is really the job of the display software, but I don't know how Adobe Acrobat handles it.

User avatar
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Postby meho_r » Fri Jul 22, 2011 3:52 pm

frabjous wrote:...
Antialiasing is really the job of the display software, but I don't know how Adobe Acrobat handles it.

Often awfully. I think there is no other viewer that (often) messes vector graphics in general as Adobe Reader does. And not only that: add a vector image containing colors (and/or draw a colored rules directly in doc) and you often get jagged edges in normal text beside badly displayed figures!

fmwyso
Posts: 3
Joined: Thu Jul 21, 2011 4:51 pm

Postby fmwyso » Fri Jul 22, 2011 6:46 pm

frabjous wrote:What exactly is your workflow for including EPS in a LaTeX PDF? Are you using pdflatex and converting with epstopdf or what?

It should remain as a vector image unless you're using a nonstandard workflow.

Antialiasing is really the job of the display software, but I don't know how Adobe Acrobat handles it.


I have been taken what I am guessing is the easy way out by putting this.

  1. \includegraphics[width=80mm, height=70mm]{Graphs/G1-a.eps}


Since Adobe Reader is so bad, what reader do most professionals use [if they are on a windows machine]. Or do they simply not care?


shadgrind wrote:Try the latex --> dvi --> ps --> pdf route to see if it makes a difference:

  1. latex your_file.tex
  2. dvips -Ppdf -G0 -z your_file.dvi
  3. ps2pdf14 -dPDFSETTINGS=/printer your_file.ps


I tried this but the result was, from what i could tell, exactly the same.

In case it isn't clear from the original post, my problem is that my graph has an ugly jagged edge across it. All of the text is being aliased and is pretty good looking (nothing complainable) but the figures I have aren't aliased at all (or very very badly).

User avatar
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Postby meho_r » Sat Jul 23, 2011 12:37 pm

Since you use pdflatex, have you tried opening EPS file in a vector editor (e.g., Inkscape, Adobe Illustrator etc.) and saving it as a PDF file, then including PDF instead of EPS?

Vector graphic shouldn't get rasterized. You can check this by zooming in: in case of vectors, the edges in figure must stay clear at any zoom level. If edges get pixelated at higher zoom levels, then your figure has been rasterized.

In any case, it is possible that this is just rendering issue, probably related to Adobe Reader, as noted before. Have you tried using another PDF viewer (e.g., PDF-XChange Viewer)?

fmwyso
Posts: 3
Joined: Thu Jul 21, 2011 4:51 pm

Postby fmwyso » Sat Jul 23, 2011 6:14 pm

meho_r wrote:Since you use pdflatex, have you tried opening EPS file in a vector editor (e.g., Inkscape, Adobe Illustrator etc.) and saving it as a PDF file, then including PDF instead of EPS?

Vector graphic shouldn't get rasterized. You can check this by zooming in: in case of vectors, the edges in figure must stay clear at any zoom level. If edges get pixelated at higher zoom levels, then your figure has been rasterized.

In any case, it is possible that this is just rendering issue, probably related to Adobe Reader, as noted before. Have you tried using another PDF viewer (e.g., PDF-XChange Viewer)?


I checked the resulting pdf (the converted-to.pdf automatically made by pdflatex) and it wasn't rasterized. I wasn't at all sure if it is the Reader, and apparently it is because using a different pdf viewer made it aliased. With this in mind, I have a few other questions...

  • Is there a way to tell Reader to anti-alias a certain figure? I have set the options for aliasing images on, but for figures it just doesn't work I suppose?
  • Because of this, would it be wise to simply convert the eps to a bitmap and use that? I am guessing the problem is that it becomes rasterized and therefore not really zoomable?

User avatar
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Postby meho_r » Sat Jul 23, 2011 7:43 pm

fmwyso wrote:...
  • Is there a way to tell Reader to anti-alias a certain figure? I have set the options for aliasing images on, but for figures it just doesn't work I suppose?
  • Because of this, would it be wise to simply convert the eps to a bitmap and use that? I am guessing the problem is that it becomes rasterized and therefore not really zoomable?

I doubt that readers are that sophisticated, but I cannot tell for sure. As for rasterizing, it is an option, though I personally prefer vectors where ever possible. But if you go down that road, make sure that print resolution for your image at scale=1 is at least 300dpi. And you should keep in mind that size of your file can increase significantly when using bitmap images, especially if there are lot of them.


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: Yahoo [Bot] and 6 guests