You can use ghostscript to convert a PDF to an image without AA. You can use ImageMagicks convert as a nice wrapper.<div><br></div><div>Groeten, Arjen<br><br><div class="gmail_quote">On Wed, Sep 22, 2010 at 7:01 PM, Ian Britten <span dir="ltr">&lt;<a href="mailto:britten@caris.com">britten@caris.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi all,<br>
I&#39;ve got a PDF surface containing pre-rendered data that I&#39;m<br>
trying to rasterize (copy) to an image surface.  Because the<br>
data represents 8-bit colour palette data, I need to rasterize<br>
it with AA off, to prevent introducing new colours.<br>
<br>
Unfortunately, it doesn&#39;t seem to be working as I&#39;d expect.<br>
Attached is a test program (With comments) showing the problem,<br>
namely that the output is AA&#39;d, when it shouldn&#39;t be (IMHO).<br>
<br>
What&#39;s really weird/surprising is that I&#39;ve found a workaround,<br>
but it doesn&#39;t really make sense (to me).  If I disable AA on<br>
the *source* PDF, _before_ drawing anything, then I can get<br>
non-AA output.<br>
<br>
To me, setting AA on/off on a PDF surface is nonsensical, and<br>
shouldn&#39;t have any effect.  But it apparently does.<br>
Additionally, the workaround doesn&#39;t really fit in my workflow,<br>
since it requires being set before any data is drawn...<br>
<br>
Does anyone have any insight/info about what I&#39;m seeing, or maybe<br>
have an alternate strategy?  To me, it seems like a bug...<br>
Many thanks for any info!<br><font color="#888888">
Ian<br>
</font><br>--<br>
cairo mailing list<br>
<a href="mailto:cairo@cairographics.org">cairo@cairographics.org</a><br>
<a href="http://lists.cairographics.org/mailman/listinfo/cairo" target="_blank">http://lists.cairographics.org/mailman/listinfo/cairo</a><br></blockquote></div><br></div>