<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002-2-1 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>C.2.1 When converting or viewing PostScript goes awry</TITLE> <META NAME="description" CONTENT="C.2.1 When converting or viewing PostScript goes awry"> <META NAME="keywords" CONTENT="GMT_Docs"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="GMT_Docs.css"> <LINK REL="next" HREF="node192.html"> <LINK REL="previous" HREF="node190.html"> <LINK REL="up" HREF="node190.html"> <LINK REL="next" HREF="node192.html"> </HEAD> <BODY bgcolor="#ffffff"> <!--Navigation Panel--> <A NAME="tex2html5371" HREF="node192.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html5365" HREF="node190.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html5359" HREF="node190.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <A NAME="tex2html5367" HREF="node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> <A NAME="tex2html5369" HREF="node256.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> <BR> <B> Next:</B> <A NAME="tex2html5372" HREF="node192.html">C.2.2 Using ps2raster</A> <B> Up:</B> <A NAME="tex2html5366" HREF="node190.html">C.2 Converting GMT PostScript</A> <B> Previous:</B> <A NAME="tex2html5360" HREF="node190.html">C.2 Converting GMT PostScript</A> <B> <A NAME="tex2html5368" HREF="node1.html">Contents</A></B> <B> <A NAME="tex2html5370" HREF="node256.html">Index</A></B> <BR> <BR> <!--End of Navigation Panel--> <H2><A NAME="SECTION002021000000000000000"></A> <A NAME="30219"></A> <A NAME="30220"></A> <A NAME="30221"></A> <BR> C.2.1 When converting or viewing <I>PostScript</I> goes awry </H2> Here are some notorious pitfalls with <I>ghostscript</I><A NAME="30484"></A> (and other rendering programs for that matter). <DL> <DT><STRONG>Rendering.</STRONG></DT> <DD>When you are converting to a raster format, make sure you use a high enough resolution so that the pixels do not show when it is enlarged onto a screen or using a projector. The right choice of resolution depends on the application, but do not feel limited to the default 72 dpi (dots-per-inch) that is offered by most converters. <P> </DD> <DT><STRONG>Image compression.</STRONG></DT> <DD>There are <I>lossy</I> and <I>non-lossy</I> compressions. A compression algorithm is called ``lossy'' when information is lost in the conversion: there is no way back to get the full original. The effect can be seen when there are sharp color transitions in your image: the edges will get blurry in order to allow a more efficient compression. JPEG uses a lossy compression, PNG is non-lossy, and TIFF generally does not use compression at all. We therefore recommend you convert to PNG if you need to rasterize your plot, and leave JPEG to photographs. <P> </DD> <DT><STRONG>Embedded image compression.</STRONG></DT> <DD>When your <A NAME="tex2html1706" HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> plot includes objects produced by <A NAME="tex2html1707" HREF="../man/grdimage.html"><I><B>grdimage</B></I></A><A NAME="30491"></A>, <A NAME="tex2html1708" HREF="../man/psimage.html"><I><B>psimage</B></I></A><A NAME="30496"></A> or <A NAME="tex2html1709" HREF="../man/pslegend.html"><I><B>pslegend</B></I></A><A NAME="30501"></A>, they are seen as ``images''. The default options of <I>ghostscript</I><A NAME="30505"></A> will use a <I>lossy</I> compression (similar to JPEG) on those images when converting them to PDF objects. This can be avoided, however, by inhibiting the compression altogether, or using the non-lossy <I>flate</I> compression, similar to the one used in the old <I>compress</I><A NAME="30508"></A> program. This compression is fully reversible, so that your image does not suffer any loss. <P> </DD> <DT><STRONG>Auto-rotation.</STRONG></DT> <DD>The <I>ghostscript</I><A NAME="30511"></A> engine has the annoying habit to automatically rotate an image produced with portrait orientation (using the <B>-P</B> option) so that the height is always larger than the width. So if you have an image that was printed in portrait mode but happens to have a width larger than height (for example a global map), it would suddenly get rotated. Again, this function needs to be switched off. Apple's <I>Preview</I><A NAME="30515"></A> uses the <I>ghostscript</I><A NAME="30518"></A> engine and suffers from the same annoying habit. Oddly enough, <I>ghostscript</I><A NAME="30521"></A> does not force landscape plots to be ``horizontal''. <P> </DD> <DT><STRONG>Anti-aliasing.</STRONG></DT> <DD>This is not something to worry about when converting to PDF, but certainly when producing raster images (discussed below). <I>Anti-aliasing</I> in this context means that the rendering tries to avoid <I>aliasing</I>, for example, sampling only the blacks in a black-and-white hachure. It does so by first oversampling the image and then using ``gray-shades'' when a target pixel is only partially white or black. <P> Clearly, this can lead to some unwanted results. First, all edges and lines get blurry and second, the assumption of a white background causes the gray shades to stand out when transferring the image to background with a different color (like the popular sleep-inducing blue in <I>PowerPoint</I><A NAME="30524"></A> presentations). A more surprising effect of anti-aliasing is that the seams between tiles that make up the land mask when using <A NAME="tex2html1710" HREF="../man/pscoast.html"><I><B>pscoast</B></I></A><A NAME="30528"></A> will become visible. The anti-aliasing somehow decides to blur the edges of all polygons, even when they are seamlessly connected to other polygons. <P> It is therefore wise to overrule the default anti-aliasing option and over-sample the image yourself by choosing a higher resolution. <P> </DD> <DT><STRONG>Including fonts.</STRONG></DT> <DD>When you are producing print-ready copy to publishers, they will often (and justifiably) ask that you include all fonts in your PDF document. Again, <I>ghostscript</I><A NAME="30532"></A> (and all converters relying on that engine) will not do so by default. </DD> </DL> <P> <HR> <!--Navigation Panel--> <A NAME="tex2html5371" HREF="node192.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html5365" HREF="node190.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html5359" HREF="node190.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <A NAME="tex2html5367" HREF="node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> <A NAME="tex2html5369" HREF="node256.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> <BR> <B> Next:</B> <A NAME="tex2html5372" HREF="node192.html">C.2.2 Using ps2raster</A> <B> Up:</B> <A NAME="tex2html5366" HREF="node190.html">C.2 Converting GMT PostScript</A> <B> Previous:</B> <A NAME="tex2html5360" HREF="node190.html">C.2 Converting GMT PostScript</A> <B> <A NAME="tex2html5368" HREF="node1.html">Contents</A></B> <B> <A NAME="tex2html5370" HREF="node256.html">Index</A></B> <!--End of Navigation Panel--> <ADDRESS> Paul Wessel 2010-07-14 </ADDRESS> </BODY> </HTML>