Thread: PNG to JPG
View Single Post
Old 03-27-2022, 08:45 PM   #7
ableal
Enthusiast
ableal began at the beginning.
 
Posts: 31
Karma: 10
Join Date: May 2009
Device: BeBook (2009), Kobo Clara HD (2018), Kobo Libra 2 (2022)
Quote:
Originally Posted by retiredbiker View Post
I often see this. Given the quality of images on an e-ink reader, I don't care much about absolute image quality. On the Kindle or Kobo I usually can't tell the difference after I seriously change and compress images. I use ImagMagick from the command line:

1. Open the book in the editor, export all the png images to a working directory.
2. In that directory, run mogrify -format jpg *.png from a terminal, of course ImageMagick has to be installed.
3. Back in the editor, delete all the png files and import all the jpg files you made
4. In search & replace, look for .png and replace with .jpg in all text files
5. Run compress images lossily at a factor of 50.

That actually takes only a minute or two after you have done it a couple of times. When you are dealing with 40 or 50 or more images, it saves hours compared to one-by-one processing.
Thanks, yeah, I'm with with you on all points, though I'm squeamish and usually stick to 85% lossy. This should work for me, no problem with CLI tools, started there donkey's years ago. Got WSL on Windows for some occasional Unix mojo.

Step 3 is the key, hadn't thought of that. Replacing manually each one of a few dozen images in a particular large book tripped my lazyness threshold

Many thanks.
ableal is offline   Reply With Quote