RSS/Atom feed Twitter
Site is read-only, email is disabled

PNG file sizes

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

3 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

PNG file sizes craniac (Steve Crane) 23 Aug 09:50
  PNG file sizes Roland Roberts 23 Aug 21:42
   PNG file sizes Dan Nikkel 24 Aug 04:28
craniac (Steve Crane)
2002-08-23 09:50:22 UTC (over 21 years ago)

PNG file sizes

I have some trouble with the large sizes of PNG files and was playing around a bit last night to see if I could reduce the size.

I saved a large (1340x771) photograph as JPEG at 75%, which resulted in a file of under 100kb. When I saved the same file as PNG the file was huge by comparison. At compression 1 it was approximately 1500kb and at 9 approximately 1400kb. This obviously precludes the use of PNG for posting images on a website.

I was under the impression that PNG can replace both JPEG and GIF images but perhaps it is only suited for the types of images that GIF is suited for and not for photographs. I would like to use PNG files more and if anyone can tell me how to achieve file sizes approaching those of JPEG I would be most grateful.

Is there a resource somewhere that explains the different options on the parameter settings dialog when saving as PNG. I have looked in the GUM but the dialog in 1.2.3 differs somewhat from what they describe. Grokking The GIMP doesn't appear to discuss this either.

Thanks. --
Steve Crane
http://craniac.afraid.org

Roland Roberts
2002-08-23 21:42:28 UTC (over 21 years ago)

PNG file sizes

"craniac" == craniac (Steve Crane) writes:

craniac> I have some trouble with the large sizes of PNG files and craniac> was playing around a bit last night to see if I could craniac> reduce the size.

PNG will store transparency (alpha layer) and 16-bit color. Your images *will* be larger than JPEG pretty much always. They will also be larger than GIF unless you convert them to indexed color.

Since these are photos, I'd suggest that JPEG is the better format for web display.

roland

Dan Nikkel
2002-08-24 04:28:14 UTC (over 21 years ago)

PNG file sizes

On 23 Aug 2002 15:42:28 -0400, Roland Roberts wrote:

"craniac" == craniac (Steve Crane) writes:

craniac> I have some trouble with the large sizes of PNG files and craniac> was playing around a bit last night to see if I could craniac> reduce the size.
craniac> ... I saved a large (1340x771) photograph as JPEG at 75%, craniac> which resulted in a file of under 100kb. When I saved the craniac> same file as PNG the file was huge by comparison.

PNG will store transparency (alpha layer) and 16-bit color. Your images *will* be larger than JPEG pretty much always. They will also be larger than GIF unless you convert them to indexed color.

Since these are photos, I'd suggest that JPEG is the better format for web display.

PNG is a lossless format (like GIF), whereas JPEG is lossey, enabling enhanced compression. For continuous tone 24-bit truecolor images (like photographs) you wouldn't really expect to get smaller file sizes with PNG compared with JPEG (which is what JPEG was designed for).

PNG's data format and compression algorithms are more robust than GIF (and it's compression isn't incumbered with patent and license issues). It can store 8-bit indexed color images (like GIF), but also handle greyscale and 24-bit truecolor images. It also handles complete alpha-channel transparency, compared with just binary transparency in GIF, and none in regular JPEG.

Comparing apples-to-apples, i.e. 8-bit indexed images -- which is all GIF can do, PNG will compress files smaller than GIFs. You don't need to store an alpha channel if you don't use one. You can also get smaller PNGs than JPEGs in some cases for images with reduced colors. But in comparing a 24-bit+alpha PNG with an 8-bit gif, or a lossless 24-bit+alpha PNG with a lossey 24-bit JPEG, PNG will generally lose in terms of file size.

PNG is a robust, flexible data format with a lot of neat features (not all of which are readily accessed in the GIMP), but it is not meant to do everything. And as Roland Roberts wrote, for continuous tone photos, where you're concerned about size and lossey storage is usually fine, JPEG is what you want. But when you need lossless storage, or want to use fancier alpha-channel transparency, or control image gamma, you need PNG.

See http://libpng.org/pub/png for more info.