How do I export a 24-bit PNG?

Post questions on how to use or achieve an effect in Inkscape.
wyatt121
Posts: 18
Joined: Wed Jan 03, 2018 8:15 am

How do I export a 24-bit PNG?

Postby wyatt121 » Fri Jul 27, 2018 6:14 am

Hi,

When I export my document it is being exported as 8-bit. How do I make Inkscape export PNG as 24-bit w/ transparency?

Any help is much appreciated.

Regards,

Wyatt

Polygon
Posts: 393
Joined: Thu Dec 19, 2013 3:27 am

Re: How do I export a 24-bit PNG?

Postby Polygon » Fri Jul 27, 2018 6:51 am

There´s no such thing as 24bit per pixel PNG existing. Alpha channel is included though.
What do you need it for if I may ask?

Cheers

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

Re: How do I export a 24-bit PNG?

Postby Moini » Fri Jul 27, 2018 7:55 am

In the next major Inkscape version 16bit RGBA is available for PNG export:
Attachments
Bildschirmfoto_2018-07-26_23-53-40.png
Bildschirmfoto_2018-07-26_23-53-40.png (52.19 KiB) Viewed 4793 times
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)

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: How do I export a 24-bit PNG?

Postby druban » Fri Jul 27, 2018 5:20 pm

24 bit color is the norm and Inkscape default should be 24 bit export (millions of colors) IF you use the file>export PNG image command
If you are choosing to save as cairo PNG ... just ...don't. There is such a format as 8bit PNG but should not be available through inkscape's current export options, what version of Inkscape and what operating system are you using?

To get 24bit plus alpha you have to go into document properties and change the background color to transparent.

if you are truly getting indexed color 8 bit png export check to see if your monitor or video card is set to indexed color and inkscape prefs is set to retrieve color profile from system this may possibly cause it but I have no experience with that ever happening
Your mind is what you think it is.

Polygon
Posts: 393
Joined: Thu Dec 19, 2013 3:27 am

Re: How do I export a 24-bit PNG?

Postby Polygon » Fri Jul 27, 2018 5:50 pm

8bit is the norm; can be read as 3x8bit per pixel=24bit - but 24bit per pixel is non existent, sample depths ranges from 1 to 16 bits with greyscale palettes and 8 or 16 bit with color palettes.

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: How do I export a 24-bit PNG?

Postby druban » Fri Jul 27, 2018 7:19 pm

I'm not really here to debate but to help answer questions
https://en.wikipedia.org/wiki/Color_depth
This page explains the difference between bits per pixel and bits per channel/color
Your mind is what you think it is.

User avatar
shawnhcorey
Posts: 149
Joined: Mon Jan 07, 2008 12:17 pm

Re: How do I export a 24-bit PNG?

Postby shawnhcorey » Fri Jul 27, 2018 9:25 pm

wyatt121 wrote:Hi,

When I export my document it is being exported as 8-bit. How do I make Inkscape export PNG as 24-bit w/ transparency?

Any help is much appreciated.


24 bits per pixel is 8 bits per colour. And you cannot see more than 8 bits per colour. You can only see about 8000 colours, not 16 million.

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

Re: How do I export a 24-bit PNG?

Postby Moini » Fri Jul 27, 2018 10:54 pm

Given that Inkscape currently uses hex color values to save the colors, and gradients and filters are the only way it would be possible to get other colors, and I think they don't, which is why Lazur is worrying about gradient banding and dithering, theoretically, at least, the max number of colors per RGBA channel in Inkscape is 256. Which corresponds to 8bit per channel, and 32bit per pixel, in my calculation (tbh. I don't understand what the RGBA_16 option for PNG export in the next version is for... Can someone explain?)

I disagree about the 8000 colors the human eye can discern. Haven't tested it myself, obviously, but everywhere I read, I find higher values. For people who are not color blind, the values are between 2.6 and 10 million.
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)

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: How do I export a 24-bit PNG?

Postby Lazur » Sat Jul 28, 2018 4:48 am

Moini wrote:which is why Lazur is worrying about gradient banding and dithering


Main reason that I can spot the banding issue well on my screen. (Luminance change is more visible than hue change though.)

Side related:
check out this cool hue test.

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

Re: How do I export a 24-bit PNG?

Postby Moini » Sat Jul 28, 2018 10:10 am

Score: 0 :) (which is best)
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)

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: How do I export a 24-bit PNG?

Postby druban » Sat Jul 28, 2018 2:53 pm

I wonder if anyone looked at the Wikipedia page I linked to which explains why there is perceptible banding even at 24 bit color depth because human perception is not evenly distributed over the visible spectrum
the proposed increase in color depth "16bit RGBA" ATTEMPTS to bridge the gaps by adding color depth uniformly even where it is not needed in order to have it where it is necessary
in particular humans can distinguish more than 256 shades of grey quite easily
Your mind is what you think it is.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: How do I export a 24-bit PNG?

Postby Lazur » Sat Jul 28, 2018 11:07 pm

Have seen it before, checked again.
Tavmjong also explained something similar, when writing about linear RGB.
Color Interpolation in SVG

The wikipedia article says
At WinHEC 2008, Microsoft announced that color depths of 30 bits and 48 bits would be supported in Windows 7, along with the wide color gamut scRGB.

so more 24bits could be displayed even on this sloppy screen of mine? Interesting.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: How do I export a 24-bit PNG?

Postby brynn » Sun Jul 29, 2018 8:05 am

Lazur wrote:Side related:
check out this cool hue test.


Geez, you could go blind trying to arrange those squares! It's not easy to do....maybe this explains why I tend to love really super bright and contrasting colors!

Let's see.... I got a zero too, but I wouldn't say it was easy. Maybe because I have the backlighting turned off of my screen, and brightness way down?

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

Re: How do I export a 24-bit PNG?

Postby Moini » Mon Jul 30, 2018 6:39 am

Hehe, if it were easy, we wouldn't have reason to be proud, brynn, right?
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)

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: How do I export a 24-bit PNG?

Postby brynn » Mon Jul 30, 2018 7:07 am

I wouldn't say I feel exactly proud. It's kind of set up like a game. But really, it's measuring something we were born with. I think I feel more lucky that I ended up with eyes that can see colors well.

But it does make me feel better, that it sounds like it wasn't easy for you either.

Actually this is different from colorblindness tests that I've seen in the past. I once worked with a school nurse (middle school aged kids), helping her to administer the tests to the whole school (yes, one kid at a time). This is what those cards looked like: https://duckduckgo.com/?q=colorblindnes ... &ia=images If any of the kids couldn't read the numbers, they were referred to a doctor for further testing. But yeah, I'm old :P They probably have better tests now.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: How do I export a 24-bit PNG?

Postby Lazur » Mon Jul 30, 2018 8:36 am

Off topic:
Got the link for that hue vision test years ago at a fashion illustration site. To my surprise, I can still do the test with 0 score while those interested in fashion and style couldn't do better than 10. Felt good outperforming those claiming which colours will be used in a given year... With all seriousness if someone is interested in colour, get a decent screen, calibrate it and train your eyes.

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

Re: How do I export a 24-bit PNG?

Postby Moini » Tue Jul 31, 2018 7:29 am

hehe :) It can be trained?

Yeah, I need a decent screen, too... well, some day, maybe.
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)

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: How do I export a 24-bit PNG?

Postby Lazur » Tue Jul 31, 2018 2:55 pm

According to the site, yes:

Get the Facts
Did you know that your ability to accurately see color depends on many factors? Here’s why your results might be different each time you take the test.

Lighting - Light plays one of the most significant roles in color perception – did you know it's actually the color of the light that determines the color your brain will perceive? You should always judge and compare color samples under controlled lighting conditions, like those provided by a light booth.

Backgrounds Effects - The human eye’s ability to correctly perceive the color is affected by the surrounding colors, a phenomenon known as simultaneous contrast. Always judge color in a neutrally colored environment.

Retinal Fatigue - Our eyes get tired very easily. When we stare at an object for longer than a few seconds, chemicals in our eyes start to deplete and begin sending incorrect information to our brains. When visually evaluating color, you should always rest your eyes between samples.

Poor Color Memory - Our brains find it extremely difficult to remember the specifics of any given color. To effectively determine slight color differences, color samples must be touching.

Age - As we get older, color perception starts to fade. However, color perception isn’t just innate; it's also a learned skill. If you’re responsible for visual color evaluation, you must know your limitations and train your eyes.

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

Re: How do I export a 24-bit PNG?

Postby Moini » Tue Jul 31, 2018 8:03 pm

Thanks, Lazur!
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)


Return to “Help with using Inkscape”