Tuesday, December 6, 2011

Alpha channels in a PNG file

I' am new to the PNG file format, but we would like to use it on a project I' am working on due to the size of the file on disk. But the problem is that we need an alpha channel in the file. I know that Photoshop CS displays the image with transparency but it has no alpha channel this is no good for us. Are there any plugins out there that allow Photoshop to do this.



Thanks

Nigel.
Alpha channels in a PNG file
Hi All,



I want to change the transparency of the PNG image, for that I gone through the document which say that, after changing the tRNS chunk of the PNG datastream we can change the transparency of the PNG image.



But after changing the 4 bytes of the tRNS chunk I can't get the transparency.



So any body can me to solve this Problem or suggest any other method to change the transparency.



regards,

krmlkr
Alpha channels in a PNG file
Use
libpng. For code relevant to alpha, see my
psdparse or
icoformat. It sounds like you're not correctly setting color_type.

Thank you for your response.

I am trying to change the transparency of image in buffer by just changing the ''tRNS chunk'' from the data stream of PNG image.

Is it possible to do so ?

If you're hand-rolling your own PNG code, then you're on your own. My advice is to use libpng.

No comments:

Post a Comment