Libpng, Palette png with alpha or not?
问题 How to know if palette png is with alpha or not? I get information about the image png_get_IHDR After that i look at color_type - PNG_COLOR_TYPE_PALETTE But i can\'t find how to know if this png image has alpha channel or not. 回答1: PNG supports transparency in two (or three) quite different ways: Truecolor or grayscale images with a separated alpha channel (RGBA or GA) Transparency extra info in the (optional) tRNS chunk . Which has two different flavors: 2a. For indexed images: the tRNS