[cairo] trouble with large image sizes
Petr Kobalíček
kobalicek.petr at gmail.com
Tue Jan 26 01:33:08 PST 2016
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> 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?
> --
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20160126/d0b3c589/attachment.html>
More information about the cairo
mailing list