I want to create a surface with 10000*30000 image surface, and after I call cairo_image_surface_create to do this, the status is CAIRO_STATUS_NO_MEMORY. Is it the width and height restrictions? Thank you very much for your time. Below is my code: image = cairo_image_surface_create (CAIRO_FORMAT_RGB24, 10000, 20000); cairo_status_t status = cairo_surface_status (image); if (status) { error(errSyntaxWarning,-1,"cairo Image error: %s\n", cairo_status_to_string(status)); }
oops, sorry! There is something wrong with my code in the last comment. My explanation is as follows, when I create 10000*20000 image surface, it will be success. But when I create 10000*30000 image surface, the status is CAIRO_STATUS_NO_MEMORY.
This sounds like a question to be discussed on the mailing list or IRC channel, not necessarily a bug?
What makes your believe that "not enough memory" is wrong? If you do the math, a surface with a width of 10k, height of 30k and 4 bytes per pixels would need more than one gibibyte of memory (10000*30000*4/(1024*1024*1024)=1.118). Could it be that allocating that much memory really fails for you?
(In reply to Uli Schlachter from comment #3) > What makes your believe that "not enough memory" is wrong? If you do the > math, a surface with a width of 10k, height of 30k and 4 bytes per pixels > would need more than one gibibyte of memory > (10000*30000*4/(1024*1024*1024)=1.118). Could it be that allocating that > much memory really fails for you? Thanks for your reply. I always thought the limit of width and height of the cairo_image_surface_create() is 32768, it seems and it depend on the bytes per pixels. Thanks again.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.