View Single Post
Old 12-31-2022, 09:25 AM   #8
LostOnTheLine
Connoisseur
LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.
 
Posts: 71
Karma: 800000
Join Date: Jun 2021
Device: Kindle Paperwhite (PW1|PW3|PW4), Kindle Voyage
Quote:
Originally Posted by patrik View Post
Would it be possible to add the feature to also make them grey-scale (if color)?
That's a good one to add for sure. I'll make a new version that includes it when I get the chance. For the time being @Mark Nord's suggestion should do just that.

Sorry it took so long to reply, I'm new to this forum & expect from others like StackExchange, Reddit, Github, DockerHub, etc, etc, to get some kinda notification when there's a reply. I'll try to check back every few days at least now that I know it doesn't


Quote:
Originally Posted by Mark Nord View Post
Hi, try to extend "customArg": "-filter Lanczos";
with " -colorspace LinearGray" or " -colorspace Gray"

Taken from the recommended ImageMagick-Documentation
This is a good way to do it, & essentially what I'll make as a True/False argument in the JSON.

But do note that from my experiences the size difference is usually negligible for converting grayscale images that are saved as RGB & I think ImageMagic does that automagically if the only colors are grays. When reducing quality to 90 I personally don't greyscale the couple of color images for my kindle because I generally already shrink the ≈40MB book to roughly 5MB & grayscaling a couple images only reduces that to like 4.8MB. I've also noticed that if the images are indexed the file size often increases when converting to grayscale, so I've personally stopped as doing side by side versions & saving like 200-500kb on most books but then gaining 1-3MB on others I decided was counter productive.

I'll put that in the instructions value for the Grayscale option (in a much sorter way) but I'd definitely suggest trying with it on & off & comparing before deciding to use it.

Thanks for the suggestion. It's an obvious one but one I didn't think of. I want this to be as easy & customizable as possible, & I'm trying to figure out how to make a GUI settings menu, but it seems my only option is to make it so you have to see the settings menu each run & click-to-start or have no GUI way to do it. I'd be interested to hear if anyone has thoughts on this or suggestions on a better way, or if people just prefer editing JSON. If it were YAML I'd probably not bother but JSON I feel is less intuitive & non-programer friendly.

Last edited by LostOnTheLine; 12-31-2022 at 09:35 AM. Reason: Clarifying
LostOnTheLine is offline   Reply With Quote