PNG exporter code: cairo or libpng?

Discussion about writing code for Inkscape.
bram
Posts: 10
Joined: Sun Aug 16, 2009 3:36 am

PNG exporter code: cairo or libpng?

Postby bram » Sat Aug 26, 2017 7:40 am

Hi,

I'm trying to solve an issue with Inkscape PNG export, that I encountered.
I grabbed the source, but I see two PNG exporters in there: cairo-exporter and libpng-exporter.

Which one is used by inkscape by default? So I know where I should look.

The issue at hand:
If the SVG background colour has alpha 0x09 or smaller, the colour channels in the resulting PNG are mangled towards zero.
When exporting a document with alpha between 0x0a and 0xff, the colour channels are preserved.
https://bugs.launchpad.net/inkscape/+bug/1713146

The exporters I found:
./extension/internal/cairo-png-out.cpp
./helper/png-write.cpp

Thanks.

Moini
Posts: 2235
Joined: Mon Oct 05, 2015 10:44 am

Re: PNG exporter code: cairo or libpng?

Postby Moini » Sat Aug 26, 2017 9:52 am

No guarantees, but I think the cairo png extension is for saving as Cairo PNG (it's a separate file format, and differs from the standard PNG export in some ways, e.g. does not support transparency.
So I'd say the other one is the one that is used.

But you will get better answers from the developers directly, either via developers' mailing list (https://sourceforge.net/p/inkscape/mail ... ape-devel/) or via IRC (development chat is listed at https://inkscape.org/en/community/discussion/ or more directly at https://inkscape.org/en/*developer/chat/)
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

bram
Posts: 10
Joined: Sun Aug 16, 2009 3:36 am

Re: PNG exporter code: cairo or libpng?

Postby bram » Sat Aug 26, 2017 10:39 am

Thanks Moini.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest