Reducing the file size of a very large images, without changing the image dimensions
问题 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 can be up to 30 MB in size, but disk storage limitations gives a maximum per file size of 1 MB. The problem is to take an input PNG of file size up to 30 MB and produce an output PNG of file size below 1 MB. This operation will obviously be lossy - and reduction in image quality, colors, etc is not a problem. However, one thing