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"><<a href="mailto:britten@caris.com">britten@caris.com</a>></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've got a PDF surface containing pre-rendered data that I'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't seem to be working as I'd expect.<br>
Attached is a test program (With comments) showing the problem,<br>
namely that the output is AA'd, when it shouldn't be (IMHO).<br>
<br>
What's really weird/surprising is that I've found a workaround,<br>
but it doesn'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't have any effect. But it apparently does.<br>
Additionally, the workaround doesn'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'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>