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

png compression

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.

9 of 9 messages available
Toggle history

Please log in to manage your subscriptions.

png compression Jim Clark 14 Apr 22:16
  png compression Carol Spears 15 Apr 01:31
png compression Kalle Ounapuu 14 Apr 22:25
  png compression Jim Clark 14 Apr 23:04
   png compression Simon Budig 14 Apr 23:21
    png compression Jim Clark 14 Apr 23:51
     png compression Joao S. O. Bueno Calligaris 15 Apr 03:28
png compression Kalle Ounapuu 14 Apr 23:11
  png compression Sven Neumann 14 Apr 23:51
Jim Clark
2005-04-14 22:16:30 UTC (about 19 years ago)

png compression

Hmmmm...

I have a couple of pngs that I have scaled to make smaller but still visible thumbnails. Image 1 (install1.png) was 799 X 598, I scaled it to 300 X 225. install10.png was 765 X 538, scaled to 450 X 317.

Here's an ls:

10725 Apr 14 13:54 install10.png 24020 Apr 14 15:01 install10_tn.png

35217 Apr 14 13:54 install1.png 32378 Apr 14 15:01 install1_tn.png

install1.png was reduced significantly and yet the file size reduction is less than 10% (hardly worth the bother to make a smaller version) and install10.png, reduced in size by a much smaller proportion, was reduced a useful (and much greater) amount.

These were png screenshots sent to me from a Win box...I cropped them to the useful area and saved them as pngs using the default settings. Then for the thumbnails I just scaled the image and saved again.

Is there something I should be doing to get a smaller file size? I have only recently started using pngs as my users are all MS/IE folks and have not really thought about file compression much. But this seems weird to me.

I realize what I don't know about file compression (or pngs, or GIMP, or most other things discussed on this list) could fill a few books, but same source same process same tools yielded very different results. Why?

Thanks-

Jim Clark

Kalle Ounapuu
2005-04-14 22:25:46 UTC (about 19 years ago)

png compression

There's lots of things you can do to make PNG's smaller.
If you save them as Indexed PNG's and reduce the colours, you may end up with smaller filesizes. Change the image mode to Indexed and it should prompt you for number of colours and other options.
After exporting the PNG, it still isn't very efficient... most apps like Gimp, Photoshop, Paintshop... they don't do a good job optimizing the PNG export. You may want to try PNG crushing programs that will optimize the PNG much more. Personally I use something called Megaopt: http://www.hydrogenaudio.org/forums/index.php?showtopic=16167 ... it's a DOS script that uses 5 PNG crushers and compares the results. Also, a WIndows GUI program called "PNG Gauntlet" does pretty good too (same as Megaopt almost). Search the net for that.
There's other tricks and things you can do... but they only save a matter of 100's of bytes.
Kalle

-----Original Message-----
From: gimp-user-bounces@lists.xcf.berkeley.edu [mailto:gimp-user-bounces@lists.xcf.berkeley.edu]On Behalf Of Jim Clark Sent: Thursday, April 14, 2005 4:17 PM To: gimp-user@lists.xcf.berkeley.edu Subject: [Gimp-user] png compression

Hmmmm...

I have a couple of pngs that I have scaled to make smaller but still visible thumbnails. Image 1 (install1.png) was 799 X 598, I scaled it to 300 X 225. install10.png was 765 X 538, scaled to 450 X 317.

Here's an ls:

10725 Apr 14 13:54 install10.png 24020 Apr 14 15:01 install10_tn.png

35217 Apr 14 13:54 install1.png 32378 Apr 14 15:01 install1_tn.png

install1.png was reduced significantly and yet the file size reduction is less than 10% (hardly worth the bother to make a smaller version) and install10.png, reduced in size by a much smaller proportion, was reduced a useful (and much greater) amount.

These were png screenshots sent to me from a Win box...I cropped them to the useful area and saved them as pngs using the default settings. Then for the thumbnails I just scaled the image and saved again.

Is there something I should be doing to get a smaller file size? I have only recently started using pngs as my users are all MS/IE folks and have not really thought about file compression much. But this seems weird to me.

I realize what I don't know about file compression (or pngs, or GIMP, or most other things discussed on this list) could fill a few books, but same source same process same tools yielded very different results. Why?

Thanks-

Jim Clark

Jim Clark
2005-04-14 23:04:37 UTC (about 19 years ago)

png compression

Things get odder and odder.

I need to put 10 screen shots on a web page and was hoping to shave 100K from the final page.

So I took one of my images and indexed it. Before index: 27004
After index: 30705.

It got larger? I downloaded and installed a png crusher and ran it against both files:

27004 after crush became: 19419 or a 28% reduction 30705 did not change--all the crushed versions were larger.

So now I have 4 images which all look about the same, ranging in size from 19419 to 30705. Quite a hit or miss process. One would think indexing and crushing would yield the smallest image, but it did not.

Thanks again-

Jim Clark

Kalle Ounapuu
2005-04-14 23:11:44 UTC (about 19 years ago)

png compression

Crushers shouldn't give you larger filesize... by default all of them have the overwrite_if_bigger function set to off.
Another PNG tool that is handy: TweakPNG
This displays all the PNG chunks being used, and allows you to see what is changing in a PNG file exactly.

-----Original Message-----
From: Jim Clark [mailto:jclark00@us.ibm.com] Sent: Thursday, April 14, 2005 5:05 PM To: Kalle Ounapuu
Cc: gimp-user@lists.xcf.berkeley.edu Subject: RE: [Gimp-user] png compression

Things get odder and odder.

I need to put 10 screen shots on a web page and was hoping to shave 100K from the final page.

So I took one of my images and indexed it. Before index: 27004
After index: 30705.

It got larger? I downloaded and installed a png crusher and ran it against both files:

27004 after crush became: 19419 or a 28% reduction 30705 did not change--all the crushed versions were larger.

So now I have 4 images which all look about the same, ranging in size from 19419 to 30705. Quite a hit or miss process. One would think indexing and crushing would yield the smallest image, but it did not.

Thanks again-

Jim Clark

Simon Budig
2005-04-14 23:21:35 UTC (about 19 years ago)

png compression

Jim Clark (jclark00@us.ibm.com) wrote:

Things get odder and odder.

I need to put 10 screen shots on a web page and was hoping to shave 100K from the final page.

So I took one of my images and indexed it. Before index: 27004
After index: 30705.

It got larger?

This can happen when dithering is enabled. PNG compression deals quite good with large areas of uniform color, dithering can spoil this by effectively creating areas with lot of differently colored pixels.

You can choose the dithering method when you convert to indexed. "None" yields smaller PNG files but might have stronger impact on the image quality.

Hope this helps,
Simon

Jim Clark
2005-04-14 23:51:13 UTC (about 19 years ago)

png compression

I no-dithered and I crushed and I reduced my 10 images from 165084 to 113479 without using any thumbnails. 50K isn't 100K, but it is a significant reduction, and with no visible loss of image quality.

Worked well--thanks for the pointers.

Jim Clark

Sven Neumann
2005-04-14 23:51:23 UTC (about 19 years ago)

png compression

Hi,

"Kalle Ounapuu" writes:

So now I have 4 images which all look about the same, ranging in size from 19419 to 30705. Quite a hit or miss process. One would think indexing and crushing would yield the smallest image, but it did not.

There are lots of options when indexing. If your goal is smaller file-size, you should avoid dithering, or at least do positioned dithering.

Sven

Carol Spears
2005-04-15 01:31:41 UTC (about 19 years ago)

png compression

On Thu, Apr 14, 2005 at 03:16:30PM -0500, Jim Clark wrote:

Is there something I should be doing to get a smaller file size?

a not so obvious file size issue is whether or not your image has an alpha channel. if your png needs transparent areas then this is a needed channel. if your png does not need transparency, it can still be saved with the channel.

an example being the screenshots on my web site. if they are screen shots of menu's stepping out, those images needed transparent areas and are really big compared to the simpler screen shots of dialogs. if you do not have transparent areas in your screenshot, Image -->Flatten will reduce the file size by an amount that i was able to see.

carol

Joao S. O. Bueno Calligaris
2005-04-15 03:28:28 UTC (about 19 years ago)

png compression

On Thursday 14 April 2005 18:51, Jim Clark wrote:

I no-dithered and I crushed and I reduced my 10 images from 165084 to 113479 without using any thumbnails. 50K isn't 100K, but it is a significant reduction, and with no visible loss of image quality.

Worked well--thanks for the pointers.

Well...so good for the PNG's..but if trading space for quality is what you want, than, just check the old JPGs ...

Jim Clark

Regards,
JS
->