View Single Post
Old 12-22-2023, 12:29 PM   #1451
jackm8
Addict
jackm8 ought to be getting tired of karma fortunes by now.jackm8 ought to be getting tired of karma fortunes by now.jackm8 ought to be getting tired of karma fortunes by now.jackm8 ought to be getting tired of karma fortunes by now.jackm8 ought to be getting tired of karma fortunes by now.jackm8 ought to be getting tired of karma fortunes by now.jackm8 ought to be getting tired of karma fortunes by now.jackm8 ought to be getting tired of karma fortunes by now.jackm8 ought to be getting tired of karma fortunes by now.jackm8 ought to be getting tired of karma fortunes by now.jackm8 ought to be getting tired of karma fortunes by now.
 
jackm8's Avatar
 
Posts: 355
Karma: 3535840
Join Date: Nov 2015
Device: none
Quote:
Originally Posted by jhowell View Post
Dithered images are a bad idea in e-books. Images often need to be converted or rescaled during rendering, resulting in unpleasant artifacts.

Perhaps there is something else going on with the high resolution cover images that you are using. Feel free to post (public domain) sample files that demonstrate the problem if you want me to look into this further.

I'll go and do some proper kfx samples later. I guess that it's best to ignore converting kfx back to epub for this comparison, and just look at kfx on e-ink device for results visible in the end. But this will involve talking photos and a bit of work.

Regarding dithering. You're right that generally dithering images is not ideal, but it is when you do dithering in exactly the same resolution as target device. Then dithering provides best possible results, at least in my experience. The problem with it is that it is very sensitive to jpeg compression, as jpeg compression basically does it's own compression that is similar to dithering, not overwriting dithered results, but adding to it, ultimately causing bad quality.
When image gets saved into jpeg to compress file sizes, some of the data is lost no matter the quality selected when saving it. Jpeg is lossy format, after all. Saving dithered files in .png format is really ideal way, but it's not supported by many readers, so saving it with highest possible .jpeg quality is an alternative. I always save them at max quality in image editors. Even going down to 95% will cause visible jpeg artefacts, whats even worse, it'll change number of colours in the file. It'll do that even when saving at max quality, but quality will still be high enough not to spot differences.

Exaggerated example on what happens when images are saved into .jpeg:

Cover source: https://archive.org/details/vilebodies0000evel_p2d8

Cover is low resolution jpeg. Opened in Photoshop. Converted into black and white. Quickly adjusted with curves for more contrast. Then dithered with ximagic grey dithering plugin (https://www.ximagic.com/) 5 levels, clustered dot 16x16 (exagerated settings). When saved as PNG this file has 5 colours, and only 135kb. When saves as jpeg in photoshop with maximum quality, resulting jpeg has 22 colours and 858kb size, but differences are still hard to spot. When saved in photoshop with '8 quality', I get 241 colours and 349kb. This time differences are easily observed, and are detrimental to the look.

I used "FastStone Image Viewer" to compare the files using it's compare function. It's important that smoothing is turned off when zooming in on images. I used it to count colours after conversions. It can also be used as a free alternative to compress posted .png file to get similar results I got using Photoshop.

Files:
"Original cover.jpg": Cover from internet archive saved as jpeg. Source is highly compressed jpeg as well.
"PNG Vile Bodies.png": Dithered image generated from "Original cover.jpg" in Photoshop via ximagic plugin.
"sample 1.png": Comparisons at 100% magnification, saved without resizing. Histograms enabled, showing that jpegs contain more colour than png. (it's in jpeg format now, so not as valid for comparison, best is saving "png vile bodies.png" as png and converting that into jpeg to get verifiable results)
"sample 2.png": Comparisons at 500% magnification in png format.

[edit]
Sample 1 really isn't quite accurate, it got downscaled by the site into .jpeg, probably for file size reasons.
Attached Thumbnails
Click image for larger version

Name:	original cover.jpg
Views:	637
Size:	634.9 KB
ID:	205370   Click image for larger version

Name:	PNG Vile Bodies.png
Views:	635
Size:	136.7 KB
ID:	205371   Click image for larger version

Name:	sample 1.jpg
Views:	626
Size:	798.0 KB
ID:	205372   Click image for larger version

Name:	sample 2.png
Views:	643
Size:	194.8 KB
ID:	205373  

Last edited by jackm8; 12-22-2023 at 01:59 PM.
jackm8 is offline   Reply With Quote