Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 04-02-2019, 01:25 AM   #1
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
KePub reader reports colour media on e-ink

I have a small number of books with colour images that look good on a colour display but very bad on a greyscale display, so I want to make custom greyscale images that only display on greyscale devices, and continue to display the colour images on colour-capable devices.

I made an ePub book that checks whether the display is colour-capable, and can select the appropriate image. It uses @media queries and Adobe XPGT conditionals so should work on both of Kobo's readers, ePub and KePub, and It also seems to work okay in Calibre. But I noticed that on my Glo the KePub reader is reporting that it has a colour display.

(Edit: I should add that the firmware version is 4.8.11073)

Maybe I don't understand how the @media queries work? Or maybe it is a problem with the KePub reader? This is the query code I used:
Code:
div.display-iff-color-unknown { display: block; }
div.display-iff-color { display: none; }
div.display-iff-not-color { display: none; }

@media (color) {
    div.display-iff-color-unknown { display: none; }
    div.display-iff-color { display: block; }
    div.display-iff-not-color { display: none; }
}

@media (max-color: 0) {
    div.display-iff-color-unknown { display: none; }
    div.display-iff-not-color { display: block; }
    div.display-iff-color { display: none; }
}
and the HTML to show the result:
Code:
  <div class="display-iff-color-unknown">
    <p>Color: Unknown</p>
  </div>
  <div class="display-iff-color">
    <p>Color: Yes</p>
  </div>
  <div class="display-iff-not-color">
    <p>Color: No</p>
  </div>
Attached is a simple ePub example (Edit: Updated to fix ePub orientation result, didn't affect KePub color result.)
Attached Files
File Type: epub media-test.epub (3.2 KB, 56 views)

Last edited by GeoffR; 04-02-2019 at 04:38 AM. Reason: firmware version, replaced faulty attachment
GeoffR is offline   Reply With Quote
Old 04-02-2019, 02:00 AM   #2
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 875
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Maybe it has to do with the fact that Nickel uses a full colour framebuffer?

If the kepub webkit renderer is determining colour information from the linux framebuffer, it will believe the screen is colour.

I don't really know though. Just a theory.
sherman is offline   Reply With Quote
Advert
Old 04-02-2019, 02:25 AM   #3
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
I just tried this on my Aura ONE as both epub and kepub and am getting the same results. I'm on a much newer firmware, but, I don't think this will have changed. What @sherman suggested is what I thought when I saw the results. In fact, I was surprised it worked for the epub.

One thing I noticed is that for the epub in landscape mode, the orientation line wasn't displayed at all.
davidfor is offline   Reply With Quote
Old 04-02-2019, 03:24 AM   #4
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by sherman View Post
Maybe it has to do with the fact that Nickel uses a full colour framebuffer?

If the kepub webkit renderer is determining colour information from the linux framebuffer, it will believe the screen is colour.

I don't really know though. Just a theory.
That sounds like a good theory.

Last edited by GeoffR; 04-02-2019 at 03:56 AM. Reason: deleted faulty ePub, I'll try again later
GeoffR is offline   Reply With Quote
Old 04-02-2019, 04:40 AM   #5
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by davidfor View Post
One thing I noticed is that for the epub in landscape mode, the orientation line wasn't displayed at all.
Thanks, I think I have fixed that now, have updated the attachment in my first post if you want to try it again.
GeoffR is offline   Reply With Quote
Advert
Old 04-02-2019, 04:54 AM   #6
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,045
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Screenshots on the Kobo H2O original are in colour.

Detecting if a display is colour or mono is an inherently dubious idea. Better to test what covers look like in mono, or even 16 shade mono. Easy in any image editing program.

You can use a "best" colour image for covers on the websites listing books. Often anyway a good mono image is automatic with a good colour image, if the mono is poor it suggests the shadows, highlights and general contrast is poor in the colour version.
Quoth is offline   Reply With Quote
Old 04-02-2019, 06:27 AM   #7
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by FrustratedReader View Post
You can use a "best" colour image for covers on the websites listing books. Often anyway a good mono image is automatic with a good colour image, if the mono is poor it suggests the shadows, highlights and general contrast is poor in the colour version.
I haven't actually had much problem with covers, I think the publishers tend to make covers high-contrast anyway so they stand out in the bookshop (at least, they would if every other book in the shop didn't also have a high-contrast cover.)

But there is some interior artwork that looks nice in colour but is fairly low-contrast, or just uses colours which don't look right when translated to greyscale by the usual algorithms. They are not poor-quality scans, I think it is how the artist intended them to look, just that they were never intended to be viewed in greyscale.


Anyway I think I have a solution: Since the colour-capability of a device doesn't change, I could make the colour images the default and use Calibre's kobo_extra.css method to override the default when sending books to a device that doesn't support colour.
GeoffR is offline   Reply With Quote
Old 04-02-2019, 06:44 AM   #8
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 FrustratedReader View Post
Screenshots on the Kobo H2O original are in colour.

Detecting if a display is colour or mono is an inherently dubious idea. Better to test what covers look like in mono, or even 16 shade mono. Easy in any image editing program.

You can use a "best" colour image for covers on the websites listing books. Often anyway a good mono image is automatic with a good colour image, if the mono is poor it suggests the shadows, highlights and general contrast is poor in the colour version.
This isn't about covers. @GeoffR said "books with colour images". And it is about experimenting. Until you know what can be done, and what it looks like, you can't be sure of what is the best thing to do.

Last edited by davidfor; 04-02-2019 at 06:45 AM. Reason: Should have refreshed before posting.
davidfor is offline   Reply With Quote
Old 04-02-2019, 09:49 AM   #9
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Note that (at least on kepubs), Mk. 7 devices will hardware dither images with a nice ordered dither pattern, which does the job fairly nicely for those cases when you can't/don't control the image processing pipeline .

EDIT: And this is how it looks in a worst case scenario.

Last edited by NiLuJe; 04-02-2019 at 11:51 AM.
NiLuJe is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I need a colour e-ink ebook reader stankovic Which one should I buy? 30 02-17-2015 06:34 AM


All times are GMT -4. The time now is 05:50 PM.


MobileRead.com is a privately owned, operated and funded community.