[cairo] Disabling AA for PDF -> Image copy
a.g.nienhuis at gmail.com
Wed Sep 22 23:26:11 PDT 2010
You can use ghostscript to convert a PDF to an image without AA. You can use
ImageMagicks convert as a nice wrapper.
On Wed, Sep 22, 2010 at 7:01 PM, Ian Britten <britten at caris.com> wrote:
> Hi all,
> I've got a PDF surface containing pre-rendered data that I'm
> trying to rasterize (copy) to an image surface. Because the
> data represents 8-bit colour palette data, I need to rasterize
> it with AA off, to prevent introducing new colours.
> Unfortunately, it doesn't seem to be working as I'd expect.
> Attached is a test program (With comments) showing the problem,
> namely that the output is AA'd, when it shouldn't be (IMHO).
> What's really weird/surprising is that I've found a workaround,
> but it doesn't really make sense (to me). If I disable AA on
> the *source* PDF, _before_ drawing anything, then I can get
> non-AA output.
> To me, setting AA on/off on a PDF surface is nonsensical, and
> shouldn't have any effect. But it apparently does.
> Additionally, the workaround doesn't really fit in my workflow,
> since it requires being set before any data is drawn...
> Does anyone have any insight/info about what I'm seeing, or maybe
> have an alternate strategy? To me, it seems like a bug...
> Many thanks for any info!
> cairo mailing list
> cairo at cairographics.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cairo