PNG: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
 
m (Cleaned up grammar and typos)
Line 1: Line 1:
PNG is [http://www.iso.org/iso/en/CatalogueDetailPage.CatalogueDetail?CSNUMBER=29581 international image stadard]. It's lossless image format good for artworks and small scans (where [[DJVU]] and [[JBIG]] are not suitable).
PNG is [http://www.iso.org/iso/en/CatalogueDetailPage.CatalogueDetail?CSNUMBER=29581 international image standard]. It's a lossless image format good for artworks and small scans (where [[DJVU]] and [[JBIG]] are not suitable).


Since it's lossless format files must be big and we should avoid them and use [[JPEG]] if possible, right ? Not so. If you'll save full-sized photo or raw scan in JPEG format - you'll get huge file, that's true. But if you'll use some simple lossy technique first (conversion to 4 or 16 levels of grayscale or just draw 16-color image with palette from the start) then you can reduce size of file many times without apparent quality loss <b>and</b> without quality degradation after save/resave. [[JPEG]] is notorious for quality degradation over time: each open-edit-save cycle adds distortion - no matter what quality settings you are using (there are no lossless [[JPEG]] unless it's [[JPEG 2000]] - but with paletted [[PNG]] you are losing quality on first save (where you ignore small variations in lighting) while further editiong is lossless.
Since it's a lossless format files must be big and we should avoid them and use [[JPEG]] if possible, right? Not so. If you save a full-sized photo or raw scan in JPEG format - you'll get a huge file, that's true. But if you use some simple lossy techniques first (conversion to 4 or 16 levels of grayscale or just draw 16-color image with palette from the start) then you can reduce the size of a file many times without apparent quality loss <b>and</b> without quality degradation after save/resave. [[JPEG]] is notorious for quality degradation over time: each open-edit-save cycle adds distortion - no matter what quality settings you are using (there are no lossless [[JPEG]]s unless it's [[JPEG 2000]] - but with paletted [[PNG]] you are losing quality on first save (where you ignore small variations in lighting) while further editing is lossless.


Use PNG for small artworks (where [[SVG]] vector nature can not produce savings), small scans (for books it's better to use [[DJVU]] or [[JBIG]]), etc. Don't forget about [http://pmt.sourceforge.net/pngcrush/ Pngcrush] - while not panacea it often can reduce size of PNG file by 10-15% for free (without any quality loss).
Use PNG for small artworks (where [[SVG]]'s vector nature can not produce savings), small scans (for books it's better to use [[DJVU]] or [[JBIG]]), etc. Don't forget about [http://pmt.sourceforge.net/pngcrush/ Pngcrush] - while not a panacea it often can reduce size of PNG file by 10-15% for free (without any quality loss).


And finally: don't use "Save" option in Photoshop - use "Save for the Web" instead: it's possible to store comments in PNG and Photoshop is abusing this possibility to store a lot of proprietary settings in PNG files - doubling and tripling size of small PNG files! And since OLPC will not include Photoshop this settings will just uselessly fill up storage space...
And finally: don't use the "Save" option in Photoshop - use "Save for the Web" instead: it's possible to store comments in PNG and Photoshop is abusing this possibility to store a lot of proprietary settings in PNG files - doubling and tripling the size of small PNG files! And since OLPC will not include Photoshop these settings will just uselessly fill up storage space.


There is a page on [[choosing image formats]] that will help you to understand the differences and how to know which format will be best for the intended use.
There is a page on [[choosing image formats]] that will help you to understand the differences and how to know which format will be best for the intended use.

Revision as of 08:04, 3 June 2006

PNG is international image standard. It's a lossless image format good for artworks and small scans (where DJVU and JBIG are not suitable).

Since it's a lossless format files must be big and we should avoid them and use JPEG if possible, right? Not so. If you save a full-sized photo or raw scan in JPEG format - you'll get a huge file, that's true. But if you use some simple lossy techniques first (conversion to 4 or 16 levels of grayscale or just draw 16-color image with palette from the start) then you can reduce the size of a file many times without apparent quality loss and without quality degradation after save/resave. JPEG is notorious for quality degradation over time: each open-edit-save cycle adds distortion - no matter what quality settings you are using (there are no lossless JPEGs unless it's JPEG 2000 - but with paletted PNG you are losing quality on first save (where you ignore small variations in lighting) while further editing is lossless.

Use PNG for small artworks (where SVG's vector nature can not produce savings), small scans (for books it's better to use DJVU or JBIG), etc. Don't forget about Pngcrush - while not a panacea it often can reduce size of PNG file by 10-15% for free (without any quality loss).

And finally: don't use the "Save" option in Photoshop - use "Save for the Web" instead: it's possible to store comments in PNG and Photoshop is abusing this possibility to store a lot of proprietary settings in PNG files - doubling and tripling the size of small PNG files! And since OLPC will not include Photoshop these settings will just uselessly fill up storage space.

There is a page on choosing image formats that will help you to understand the differences and how to know which format will be best for the intended use.

More info can be found on Wikipedia.