[cairo] trouble with large image sizes
Dan Raymond
draymond at foxvalley.net
Wed Jan 27 08:23:55 PST 2016
That's an unfortunate restriction. I suppose to create larger images I
would need to create multiple surfaces and stitch them together?
On 1/26/2016 2:33 AM, Petr Kobalíček wrote:
> I guess anything above 65535 (width or height) is a risk. There are
> various places that use fixed point, this would probably overflow it.
>
> On Tue, Jan 26, 2016 at 2:44 AM, Dan Raymond <draymond at foxvalley.net
> <mailto:draymond at foxvalley.net>> wrote:
>
> I'm trying to create a large image surface using Cairo but I am
> getting an error. When I execute the following code it succeeds
> (status is CAIRO_STATUS_SUCCESS):
>
> uint32_t width = 40960, height = 23040;
> cairo_surface_t *surface =
> cairo_image_surface_create(CAIRO_FORMAT_RGB24, width, height);
> printf("status = %d\n", cairo_surface_status(surface));
>
> But if I double the width and height it fails (status is
> CAIRO_STATUS_INVALID_SIZE):
>
> uint32_t width = 81920, height = 46080;
> cairo_surface_t *surface =
> cairo_image_surface_create(CAIRO_FORMAT_RGB24, width, height);
> printf("status = %d\n", cairo_surface_status(surface));
>
> Is there an arbitrary restriction on the size of an image surface?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20160127/dad13b3d/attachment.html>
More information about the cairo
mailing list