Granular PNG Export Options

Bug #170650 reported by Ubersoft
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Fix Released
Nominated for 0.48.x by A

Bug Description

Currently when you export to PNG it exports as a full 24-
bit PNG file. It would be nice if it were possible to have a
few more options when exporting to PNG, to be able to
export as 8-bit indexed, greyscale, B&W, etc., as well
as to choose whether or not you want it dithered, how
much compression to use, interlaced or non-interlaced,
alpha channels or no alpha channels, etc.

While it is possible to just fire up the gimp and do all
these things yourself, it's an extra step or two that could
be avoided. If you're creating a drawing in inkscape you
want to use as a web graphic, it'd be useful to have all
the png settings in inkscape so you can try and get the
file as small and as efficient as possible...

Revision history for this message
Bug Importer (bug-importer) wrote :

True, true. So true.

I use few colours in my pictures, and almost always flat
ones. I've found that I can safely downgrade the image to 32
colours, and you won't notice the change. But the decrease
in size is impressive.

For things like this, and others, this would be really helpful.

Revision history for this message
Molumen (molumen) wrote :

Also, a good thing would be the possibility to choose if
antialiasing is ON or OFF.

Revision history for this message
Prokoudine (prokoudine) wrote :

2 nobody:

Why not using a 32 color .gpl palette from GIMP for now? :)

Revision history for this message
Nicubunu (nicubunu) wrote :

prokoudine -> yes, is possible to create the image using
just a few colors, but at export to PNG it will be saved
anyway as 24 bit with antialiasing, so the result will be a
big file

Changed in inkscape:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
John Croisant (jacius) wrote :

I'm particularly interested in the ability to export without an alpha channel. Many of the images I create have solid backgrounds, but they export with an alpha channel, which needlessly increases the file size. I work around this by editing the PNG in GIMP to remove the alpha channel, but that is time consuming, especially when making many frequent, minor revisions to the original SVG.

Revision history for this message
Joshua Blocher (verbalshadow) wrote :

Simply setting the background color in the document property dialog will stop alpha channel from being present. The real issue maybe anti-aliasing which we can not turn off yet.

Revision history for this message
John Croisant (jacius) wrote :

@Joshua: Even with a fully opaque background color (alpha 255), the PNG still exports with an alpha channel (even though all the data in the channel is fully opaque).

That's not to say that turning off anti-aliasing is unimportant, but my personal peeve is the alpha channel.

Revision history for this message
marcus (marcus256) wrote :

I would really, really like to have a dither option for the PNG export.

I like to do simple background images and similar jobs in Inkscape, but since I usually use slight gradients I very often end up with ugly bands (say 10-50 shades of gray) even with 24/32-bit colors.

jazzynico (jazzynico)
tags: added: preferences
removed: import-export
su_v (suv-lp)
tags: added: color
Revision history for this message
A (launch123) wrote :

Wow - 5 years later and still only one person says this effects them ...

I've just started using Inkscape (I only used The GIMP before ... for the last 5 years)
The GIMP's font handling is extremely poor and unreliable ... Inkscape works well in that respect.

Very first problem I found was trying to export to a greyscale PNG ... looking at this bug report agrees that it's not possible.

I must reload the file in The GIMP, flatten and greyscale it. Very annoying.

Also, I should add, the front page for Inkscape says:
"Inkscape is an SVG-based graphics editor featuring alpha blending, node editing, SVG to PNG export, and more."

Seems odd that "SVG to PNG export" is considered that topical, and yet for the last 5 years it hasn't included any PNG options ...

su_v (suv-lp)
tags: added: bitmap
Revision history for this message
David Van Mosselbeen (david-van-mosselbeen-s) wrote :

Working back on old stuff can't be that bad...
I feel the alpha channel, and compression options also handy. Atm, i need to re-edit the exported png files with Gimp. For the FlightGear Flight Simulator project for example, which use the OpenSceneGraph as engine, it is very important that the textures doesn't have an useless (non-needed) alpha channel. I don't know much about the technical part of it, but it just add an useless layer of computation for no reasons and can slow down the frames per seconds drastically if you use many or big textures.

Kind regards

Revision history for this message
Alexander (ae-4) wrote :

Please, give us an "Alpha" checkbox in the export dialog! There's a lot of places that don't accept RGBA PNGs (XCode, iTunes Connect, ...). This bug is now 11 years old.

Mc (mc...)
Changed in inkscape:
assignee: nobody → Mc (mc...)
milestone: none → 0.93
Revision history for this message
Mc (mc...) wrote :

#11:I'd say the bug is that people don't accept rgba png :)

nyway, I'vz tackled this bug and commited to rev 15131.

Attached is a screenshot of the interface (it can change). I did Grayscale/GA/RGB/RGBA choice + bit depth choice, interlacing, pHYs dpi, and compression choice.

Dithering is not a PNG option, and might be done via cairo, but I'm not sure how for the moment, so it's not there.

Changed in inkscape:
status: Confirmed → Fix Committed
Max Gaukler (mgmax)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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