Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding/Editing transparency in an indexed PNG
#1
Hello,

I have an indexed PNG and want to edit the transparency of it - my problem: Transparency is either 0% or 100%

What I'd like to have: I'd like to add a transparency value to each of the 255 indexed colours - so colour 1 is totally transparent, and the others transparency should be set to something between 50% and 90% depending on their brightness (white -> 90%, black -> 50% or something similar) - (I wouldn't mind to edit the 255 colours by hand if necessary).

I did something like this few years ago, but can't reconstruct how I did it - though I ended up with a 24 bit per Pixel PNG, so maybe it's not possible to have an indexed PNG with varying degrees of transparency!?

If I open the indexed PNG it shows two channels, one with the image information and the other with transparency information is a black or transparent thing with nothing inbetween (seems to be just 1 bit of info per pixel) - so maybe it's possible to change that part (and have 1 byte per pixel as well).

Thanks for any hints.
Reply


Messages In This Thread
Adding/Editing transparency in an indexed PNG - by out-of-mind - 11-18-2022, 04:23 PM

Forum Jump: