what's the reason the PNG image need to be crushed?

372 Views Asked by At

I noticed that some article talking about crushed PNG images and how to uncrush them. What's the purpose of crush the images in the first hand? And also can the crushed images still be loaded using [UIImage imageWithName:]?

2

There are 2 best solutions below

0
On BEST ANSWER

It's used to reduce the file's size, using lossless optimizations and/or compression.

It can evaluate your input image using several optimizations. Basic example: If your input is grayscale and saved as color, it may output a grayscale image. Of course, there are more complex optimizations which it uses.

can the crushed images still be loaded using [UIImage imageWithName:]?

Yes

1
On

It's basically a form of compression that doesn't involve any data loss (that is, you don't lose any image quality). Compressing any data reduces it's size that's the reason for actually doing it.