Reducing the file size of a very large images, without changing the image dimensions

后端 未结 12 2145
囚心锁ツ
囚心锁ツ 2021-01-31 08:51

Consider an application handling uploading of potentially very large PNG files.

All uploaded files must be stored to disk for later retrieval. However, the PNG files ca

12条回答
  •  遇见更好的自我
    2021-01-31 09:21

    It depends on they type of image, is it a real life picture or computer generated image, for real life images png will do very little it might even not compress at all, use jpg for those images, it the image has a limited number of different colors (it can have a 24 bit image depth but the number of unique images will be low) png can compress quite nicely. png is basicly an implementation of zip for images so if a lot of pixels are the same you can have a rather nice compression ratio, if you need lossless compression don't do resizing.

提交回复
热议问题