PNG compression for use with CIFilter

I have an iPhone app that overlays an image created by XIB using CIFilter CIHardLightBlendMode. The view is 1000x1000 pixels, and I want to keep this size to the end. This makes image files about 1 MB in size as png if there is any complexity.

I tried using JPG, but it does not overlay the image on the view on the device (it works on the simulator). I tried to compress PNGs, but they get distorted when they are overlaid on top of the view (they look identically full featured until they are overlaid). In addition, when Xcode re-compresses PNG into a special version of iOS, savings in compression size are lost.

I would really like to compress several files, but I'm not sure what will work with CIFilter. Any tips?

+4
source share
2 answers

Thanks to this article Smart PNG Optimization Techniques - I found a trick that reduced file size.

Posterization reduced the file size from 1.3 MB to 458 KB (and 326 KB after Xcode optimization!). This is a huge savings. My photos (textures) can be heavily transferred, so I'm not sure if this will work in other situations.

0
source

If you are interested in a new approach that reduces the size of compressed image files, I also created an iOS environment that compresses PNG images into a more compact form called PNGSquared . This is similar to the posterization approach, but you have more quality control.

0
source

Source: https://habr.com/ru/post/1446701/


All Articles