(very) big png export seems void and transparent

Bug #1175692 reported by Arnaud Gout
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Medium
Unassigned

Bug Description

I tried to export a png with a resolution around 44000*20000
No crash, but the result seems to be void in photoshop (RGB = 0,0,0 / alpha = 1)
Exactly the same operation in 0.48 works fine.

version used: 0.49.12312

This issue has been noticed in the following systems:
Windows 7 x64(compiled in 32bit)
Debian (Linux Mint, compiled in 64bit)

You can check this issue with the following options applied to the svg below:
Export area: "Page"
Export resolution: 25,4 dpi
These export options should provide a 44457*21261 bitmap

Revision history for this message
Arnaud Gout (arnaud-gout-x) wrote :
tags: added: export
tags: added: png
Revision history for this message
su_v (suv-lp) wrote :

> version used: 0.49.12312

Which OS/platform?

tags: added: bitmap exporting regression
removed: export png
Revision history for this message
su_v (suv-lp) wrote :

> a ready-to-export svg for testing purpose

Could you please provide details about the export options (export area, image size)?

description: updated
Revision history for this message
Arnaud Gout (arnaud-gout-x) wrote :

Maybe this issue is to be linked with bug #955889
Which is the same problem but with pdf export

Martin Owens (doctormo)
Changed in inkscape:
status: New → Confirmed
jazzynico (jazzynico)
Changed in inkscape:
importance: Undecided → Medium
Revision history for this message
Kevin (kevin360) wrote :

Having the same issues with exporting a large PNG file. Version 0.48.5 works fine, but version 0.91 outputs an almost blank image. It appears to be blank when first opened in gimp because it's so zoomed out, but when you zoom in there are actually stripes in the image. It does appear to be an overflow issue because I can cause the problem by just increasing the width of the export by 1 pixel.

Here's the details on my tests:

Slackware Linux 64-bit

Inkscape Version 0.91 r13725

Export Area - Page
X0: 0
X1: 10240
Y0: 0
Y1: 5895
Width: 10240
Height: 5895

Image Size:
Width: 32767
Height: 18863

export at this size is correct, no issues

Inkscape Version 0.91 r13725

Export Area - Page
X0: 0
X1: 10240
Y0: 0
Y1: 5895
Width: 10240
Height: 5895

Image Size:
Width: 32768
Height: 18864

notice that the width and height have been increased by 1 pixel, the export at this size appears blank, but really it has the stripes as shown in the attached file.

Inkscape Version 0.48.5

Export Area - Page
X0: 0
X1: 10240
Y0: 0
Y1: 5895
Width: 10240
Height 5895

Bitmap Size:
Width: 32768
Height: 18864

output is correct, this is the same size that fails with version 0.91. I have increased the width up to 64000 and it still comes out correct on version 0.48.5

Revision history for this message
Kevin (kevin360) wrote :

Turns out this is an issue with cairo and not inkscape. Cairo has a limit on the maximum image size:

http://lists.cairographics.org/archives/cairo/2013-March/024145.html

Slackware (which is what I run) is currently using version 1.12.16, so I downloaded the source and edited:

src/cairo-image-surface.c

Around line 60 it has:

/* Limit on the width / height of an image surface in pixels. This is
 * mainly determined by coordinates of things sent to pixman at the
 * moment being in 16.16 format. */
#define MAX_IMAGE_SIZE 32767

I increased it by adding three zeros:

#define MAX_IMAGE_SIZE 32767000

After recompiling cairo and installing it I can now export large png files from inkscape. I just created one that's 60000 x 45790 in size and it opened fine in gimp, everything looks good.

Revision history for this message
jazzynico (jazzynico) wrote :

See also: https://bugzilla.mozilla.org/show_bug.cgi?id=591822

Not sure there's anything we could (or even should) do.

Changed in inkscape:
status: Confirmed → Triaged
su_v (suv-lp)
tags: added: cairo
Revision history for this message
Nathan Lee (nathan.lee) wrote :

No new progress, but as part of bug migration to Gitlab, closing this issue.

It can still be tracked here: https://gitlab.com/inkscape/inkscape/-/issues/543

Changed in inkscape:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.