View Single Post
Old 01-10-2015, 02:31 AM   #212
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by NiLuJe View Post
First of all, sorry for digging up a relatively stale thread... .
No problem. This is the right place for this sort of discussion.
Quote:
Given the terrible rendering of covers in sleep mode, I quickly enabled the "B&W Covers" setting, but when that didn't help much, I took a look at the code: it basically just does what's on the tin, without dithering it down to the eInk 16 shades of grey palette.

Since I was in a hurry, I took a very dirty approach and applied this simple patch to the Calibre sources:

Code:
diff --git a/src/calibre/utils/magick/draw.py b/src/calibre/utils/magick/draw.py
index 73832a1..d0793c4 100644
--- a/src/calibre/utils/magick/draw.py
+++ b/src/calibre/utils/magick/draw.py
@@ -75,6 +75,7 @@ def save_cover_data_to(data, path, bgcolor='#ffffff', resize_to=None,
 
     if grayscale:
         img.type = "GrayscaleType"
+        img.quantize(number_colors=16, dither=1)
         changed = True
 
     if resize_to is not None:
It's dirty as hell, but it appears to be doing the job just fine. (Granted, the quantization step is expensive and appears to block the GUI, but, it works, I can now look at book covers without making my eyes bleed ;p).

I'm basically just throwing the idea out there to see if there's a way to handle that more gracefully .

[Granted, my opinionated position on this issue most likely stems from the pains I took to do it right with the Kindle's ScreenSavers hack ]
I can't say I've noticed a problem. I haven't noticed the problem on my Glo, but it might be more noticeable on the higher resolution HD and H2O. How do the covers for kepubs from Kobo look? A preview should show it.
davidfor is offline   Reply With Quote