3 ms·
It reorders the bytes of the image from RGBA to BGRA, which is the natural byte order used by the GPU (other byte orders are supported, but have to get swapped
by robterrell 16y ago
It reorders the bytes of the image from RGBA to BGRA, which is the natural byte order used by the GPU (other byte orders are supported, but have to get swapped when loaded). Also, it premultiplies each color channel by the alpha channel. So if you have a blue pixel with a 50% alpha (RGBA 00 00 FF 80) it gets converted to (BGRA 80 00 00 80). After that, it uses the usual pngcrush method of trying all different compression settings until it finds the smallest size. So it's optimized both in terms of size and speed of rendering.