[cairo] really wide images?

Toby Dylan Hocking toby at sg.cs.titech.ac.jp
Sun Mar 17 21:41:21 PDT 2013

Hi, I would like to use cairo to create a PNG scatterplot of some time
series data that is 768315 pixels wide by 100 pixels tall. In
particular it is a sparse binary image: 99% of the pixels are white,
and only a few pixels are black. Using cairo under both R and Python,
I get an error: 'invalid value (typically too big) for the size of the
input (surface, pattern, etc.)'

I noticed there is a limit in cairo-image-surface.c and I thought
about changing it and recompiling.

#define MAX_IMAGE_SIZE 32767

However I suspect that won't work unless I also change pixman
somehow. Do you have any advice about how to do that? Or can you
recommend another package that would be able to make my wide PNG?

Thanks in advance.

More information about the cairo mailing list