Posts

Post not yet marked as solved
0 Replies
292 Views
I did quite a bit of testing of 24 BPP sRGB tagged pixel data saved into a PNG file, and while this seems hard to believe, the Apple asset catalog PNG encoding process is actually silently changing input PNG data so that it is no longer lossless.An example 4x4 image represented by the following hex pixel values:https://i.stack.imgur.com/9Bz8n.png0x020100 0x050403 0x080706 0x0B0A09 0x0E0D0C 0x00000F 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000This image data is fine up until you put it into a asset catalog, the xcode build process changes the PNG pixel data to the following:0x020100 0x050403 0x080706 0x0B0A09 0x0E0D0C 0x00010E 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000 0x000000Any ideas on how this PNG pixel data modification in the asset catalog (cartool) creation process can be prevented?
Posted Last updated
.