[cairo] [Maposmatic-dev] Re: Cairo & libpng/zlib parameters
britten at caris.com
Wed Feb 10 07:47:22 PST 2010
Chris Wilson wrote:
>> The thing that is limiting today is the size of the area that Cairo can
>> render in PNG mode. Some large French cities (such as Arles) cannot be
>> rendered because of this, the rendering fails with an out-of-memory.
>> Rendering the PDF and/or the SVG for the same area works fine, though.
> We can lift it, and there is no inherent reason why pixman is only using
> 16bit integers.
+1 Yay! :)
I too am rendering huge images, and have encountered this limit
before too, so I'll add my $0.02 ...
I've since implemented a tiled solution, but it's slow(er) for the
user, due to the extra draws (of our data) necessary for each tile.
Being able to get into the 50-80k range would probably allow us to
eliminate the tiling step in the majority of cases (Assuming enough
RAM, of course).
> However that will only increase the maximum size to 2^23
> (i.e. limited to cairo's own 24.8 coordinate system). Also, if you wish to
> enable h/w acceleration for rendering then Cairo itself does not provide
> convenience functions for tiling (though constructing an array of surfaces
> with varying devices offsets and repeating the rendering to each is
> trivial), and h/w limits tend to be much smaller than the 32kx32k
> limitation of pixman.
Understood. Not a problem (for me).
> What's the information content of these very large images?
Two common cases for us, at least:
[ Note - I wouldn't recommend either of these personally, but they're
requirements from some users ... ]
- Generating extremely high resolution images (eg: GeoTIFF) from
vector data, for subsequent viewing/zooming/etc. Usually to be
contained within a single (TIFF, BigTIFF) file, not a set of
- Generating poster-size printouts (at high resolution), which pretty
much requires rasterizing A0 paper at 1200DPI. Note that this is
for directly printing to the printer, which is not the same as
producing a PDF file on disk (in case you were to suggest that).
In both of these cases, we're tiling. As noted above though, this
often results in a slow operation ...
> I'd guess the
> SVG or PDF (in particular) representation will be much more compact than
> the rasterised PNG.
Yes, you are correct. However, at this time, we have no viable
solution for turning around and drawing the resulting PDF file
(Poppler is GPL :( ). So, (high-res) images are currently used...
Got any suggestions?
More information about the cairo