Optimize PNG files to reduce file size when publishing to NPM.
With this patch, you can deploy image files that are exactly the same on the screen, but with about half the file size.
Technical Details:
Due to its specifications, a PNG file can represent the exact same image data in multiple ways.
There are probably a thousand combinations of the major representations, but it would take too long to try them all, so image processing applications (e.g., photoshop and mspaint) usually try one or a few different combinations to create a file.
pngcrush tries those combinations and looks for the smallest possible combination.
Therefore, the smaller size caused by this patch is not due to degradation, not like JPEG.
In addition, pngcrush is set to remove unnecessary chunks.
This removes trivial information, such as the name of the software used to create the file, for example, and saves dozens of bytes.
Optimize PNG files to reduce file size when publishing to NPM. With this patch, you can deploy image files that are exactly the same on the screen, but with about half the file size.
Before the patch:
After the patch:
Technical Details: Due to its specifications, a PNG file can represent the exact same image data in multiple ways. There are probably a thousand combinations of the major representations, but it would take too long to try them all, so image processing applications (e.g., photoshop and mspaint) usually try one or a few different combinations to create a file.
pngcrush
tries those combinations and looks for the smallest possible combination. Therefore, the smaller size caused by this patch is not due to degradation, not like JPEG.In addition, pngcrush is set to remove unnecessary chunks. This removes trivial information, such as the name of the software used to create the file, for example, and saves dozens of bytes.