PNG compression
From Retro CDN
Revision as of 11:32, 28 February 2018 by Black Squirrel (talk | contribs) (Created page with "Our policy is to use PNG images whenever possible—that is, barring animations (which should be stored as GIF) or physical scans (which should be stored as JPG), all images s...")
Our policy is to use PNG images whenever possible—that is, barring animations (which should be stored as GIF) or physical scans (which should be stored as JPG), all images should be in the Portable Network Graphic, or PNG, format. This preserves images without losing quality, as one would have with JPG, or causing a bloated filesize, as one would with have with GIF.
Moreover, it is important to convert existing GIF images on the wiki to PNG to help condense the size of the wiki and reduce load, however light, on the server. For instance, 200 images from various Sonic Cafe images were converted from GIF to PNG, and the total size of these images went from 1638561b to 933304b. This sort of reduction, when applied on a large scale, is incredibly useful.
It is highly recommended that pngpress, a combination of various PNG compression mechanisms, be used to ensure the smallest, most effecient PNG file possible. To use, download below and place the files in the "system32" folder in your system file (e.g., WINNT/SYSTEM, WINDOWS/SYSTEM32), then place the the "pngpress.bat" batch file in a folder containing the PNG files you wish to compress. Running the batch file will compress the PNG images. pngpress is recursive, meaning it will compress PNG files not only in the folder it is placed in, but will detect PNG files in any other folders inside that folder.
In addition, pngpress can be used in conjunction with gif2png, a commandline program which converts GIF files to PNG files. By opening pngpress.bat in Notepad and adding the following line...
for /F "usebackq delims=" %d in (`dir /s /b *.gif`) do gif2png -ardt "%d"
...to the beginning of the file, you can directly convert from GIF to compressed PNG.
Download PNG compression |