Which CGImageAlphaInfo should we use?

后端 未结 4 1958
迷失自我
迷失自我 2020-12-09 12:05

The Quartz 2D programming guide defines the availability of the various alpha storage modes:

\"enter

4条回答
  •  执念已碎
    2020-12-09 12:51

    The most universally used is RGBA format (True colour format) where the Alpha byte is located at the last byte describing the pixel. - kCGImageAlphaPremultipliedLast (32 bits). Not all formats are as supported universally by all devices.just an observation but all the png and jpeg images that I processed downloaded from the web are all RGBA (or turn into that when I convert PNG to UIImage) - I've never come across an ARGB formatted file in the wild, although I know it is possible.

    The different formats affect the file size of the image and the colour quality (in case you didn't know) and the image quality, the 8 bit formats are black and white (grey scale) a discussion of all these is found here: http://en.wikipedia.org/wiki/Color_depth

提交回复
热议问题