View Single Post
Old 02-22-2021, 02:15 AM   #83
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by KevinH View Post
Unless it is a state secret ... how on earth do you get your image file sizes so small?

[...]

I then compared it to your pageedit.png that you produced (literally the same width and height and ppi) and it was only 35kb - less than 1/10th my file size!.

How is that possible? Your file sizes are truly amazing and they still look great on the screen.
It looks like they were lossy conversions by:
  • converting to Indexed (256 colors or less)
    • Ehh, don't know how much I agree with that on some of these images. (See note below.)
  • resizing/lowering resolution.
    • Again, I don't agree on many of these.
    • Remember, there are now higher DPI devices out there + higher resolution monitors coming out. You want to future-proof, not go backwards.
    • And while yes, some of those 4k images were a bit excessive, but I definitely wouldn't shrink down to 800px.

Side Note: See my 2013 ScriptPNG post explaining PNG compression + Indexing.

Indexing is fine on very basic images, like:

cp-menu.png

Here's the one I compressed a few days ago vs. Indexed (145 KB vs. 40.5 KB):

Click image for larger version

Name:	cp-menu.png
Views:	127
Size:	145.2 KB
ID:	185519 Click image for larger version

Name:	cp-menu[128Indexed].png
Views:	122
Size:	40.6 KB
ID:	185520

The 1st is full RGB + 2nd only has 128 colors.

Very little visual difference.

But to resize down to a thimble PLUS Indexing? Compare the above 2 with:

Click image for larger version

Name:	cp-menu[Ashjuk].png
Views:	130
Size:	8.1 KB
ID:	185518

It went from 684x228 -> 226x91 (8.09 KB)....

Sure, the filesize is "much smaller", but:
  • the text is all fuzzy/blurry (because of resizing/artifacting!).
  • you threw away so much of the information/color with an enormous lossy conversion.

(Also see my other 2013 posts about JPG/GIF/PNG and lossy conversions: "Tables in an epub?". Especially posts #5+8.)

Quote:
Originally Posted by KevinH View Post
I used Gimp and rescaled my original macOS screen capture pageedit.png file to 800 by 850 and downsampled it from 144 ppi to 72 ppi and saved it.
You can Index in GIMP by:

1. Image > Mode > Indexed.

2. Generate optimum palette and set the "Maximum number of colors". This will be a number from 2->256.

Depending on the image, sometimes these can be Indexed down to very few colors (like the 17 I use on formulas), and you'll visually see very little difference.

PS. And "DPI" in PNGs is gibberish. It's only metadata that doesn't mean anything. Changing that number won't save you any filesize.

Last edited by Tex2002ans; 02-22-2021 at 03:16 AM.
Tex2002ans is offline   Reply With Quote