![]() |
#1 | |
Browser
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 745
Karma: 578294
Join Date: Apr 2010
Location: Australia
Device: Kobo Touch, Kobo Aura HD
|
Wrangling covers for ePub
OK, I confess, there's a lot about ePub coding I haven't got my head around. But I have a Kobo Touch and an Aura HD, and am trying to code covers that work on both devices.
The Touch's display is 600x800, the Aura HD 1080x1440 — so, same pixel ratio. I've been making the cover graphics 1080x1440 @ 265 ppi, the size of the Aura's screen. I'm using Jutoh to code the the ePub, and it creates the following code for the cover image: Quote:
I found this code, which uses and SVG wrapper and seems to work, but I don't understand what makes the difference. I'd be grateful for any observations or advice, please. |
|
![]() |
![]() |
![]() |
#2 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,029
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
You don't want the cover to fill the entire screen unless it is aspect ratio correct to do so. If you stretch the cover image to fill the screen, you will have an image that could look off because it is off. You want to keep the cover's aspect ratio. That means in most cases you will have space on the left/right side of the screen and that is correct. It is incorrect to make the screen aspect ratio wrong.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,634
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
![]() Use the following code: Code:
<div> <svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 600 800" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink"> <image height="800" width="600" xlink:href="../Images/CoverDesign.jpg"/> </svg> </div> Regards Rubén PS: Of course, you must keep the size of your cover in 1080x1440. Last edited by RbnJrg; 11-29-2013 at 06:49 PM. |
|
![]() |
![]() |
![]() |
#4 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 580
Karma: 810184
Join Date: Sep 2010
Location: Norway
Device: prs-t1, tablet, Nook Simple, assorted kindles, iPad
|
Dunno... If the cover is mildly aspect-distortion tolerant, I like to let the cover fill the entire screen, and gamble that not too many readers read my books in portrait mode or on odd-sized devices.
|
![]() |
![]() |
![]() |
#5 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,634
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
The code I posted is for the case of MacEachaidh ![]() https://www.mobileread.com/forums/sho...4&postcount=20 Regards Rubén |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Browser
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 745
Karma: 578294
Join Date: Apr 2010
Location: Australia
Device: Kobo Touch, Kobo Aura HD
|
Folks, thanks for the replies. (Strangely, I got no notification that anyone had posted here. Glad I checked!)
The covers are already in 1080x1440 ratio, so yeah, I want them to stay that way. Rubén, thanks for the SVG code. I'll give it a go. And I'm petty sure I can save it as a default custom code in Jutoh, so it's generated automatically. I was worried that some devices may not be able to handle SVG code, but I guess it's more commonly implemented now? I'm interested in why you feel that covers should always be in an SVG wrapper? Is it something to do with the rendering? Interesting comments, SBT — it never occurred to me that people would read a book in landscape. A PDF or graphic novel, maybe, but not text. JSWolf, I hear what you're saying, and thanks for your comments. But the cover image is already in 1080x1440, so I don't understand why the regular code (width and height both set to 100%) results in the image being squished in at both sides, which *is* distorting the graphic. (Key words: I don't understand. ;-) ) So, I'll give the SVG, and trust to the fact that it works, without my understanding. Maybe one day it'll be clear. ;-) |
![]() |
![]() |
![]() |
#7 |
Browser
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 745
Karma: 578294
Join Date: Apr 2010
Location: Australia
Device: Kobo Touch, Kobo Aura HD
|
Rubén, the version I had come across of the SVG wrapper is identical to yours, except that instead of
preserveAspectRatio="xMidYMid meet" it says preserveAspectRatio="none" Nonetheless, it seems to work. What's the difference? |
![]() |
![]() |
![]() |
#8 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,634
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
preserveAspectRatio="xMidYMid meet" is not distorted and the cover showed with preserveAspectRatio="none" it is ![]() Please, read this chapter of SVG Essentials to understand the code you are using (of course, if you wish you can read all the online book ![]() http://commons.oreilly.com/wiki/inde...ls/Coordinates Regards Rubén PS: For the reasons you'll read there is that I recommend to use a SVG wrapper for the cover page. |
|
![]() |
![]() |
![]() |
#9 |
Browser
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 745
Karma: 578294
Join Date: Apr 2010
Location: Australia
Device: Kobo Touch, Kobo Aura HD
|
Thanks for the links, Rubén. Some reading there for me.
![]() I hear what you say about the preserveAspectRatio="none" setting only working when the image is the same pixel size (or ratio) as the screen, which it may not be on other devices. That makes sense, of course. What confuses me, though, is that on my two Kobos, with the preserveAspectRatio="none" setting, the cover is the same size as the full screen, but if I use preserveAspectRatio="xMidYMid meet" (which, if I understand correctly, you're saying will work universally), then on my two Kobos the cover image *does not* fill the screen, even though it's the same pixel size. With the "meet" setting, the image is compressed laterally and there are thing margins up each side of the image where the background shows through. So it seems to me that the "meet" setting isn't working as you described. The rest of the code is identical to what you posted here. Is there a reason this doesn't work for me? |
![]() |
![]() |
![]() |
#10 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Yes, your cover is not of the same pixel size as the screen. An e-Ink screen does not really work with pixels. If you really want to know the pixel sizes, you need to experiment.
|
![]() |
![]() |
![]() |
#11 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Does the kobo show some kind of status bar? That would take some screen space, making the available screen a bit shorter. When the cover adapts to this sorter dimension, the width becomes shorter too.
|
![]() |
![]() |
![]() |
#12 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,634
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Code:
<div> <svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 1080 1440" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink"> <image height="1440" width="1080" xlink:href="../Images/CoverDesign.jpg"/> </svg> </div> |
|
![]() |
![]() |
![]() |
#13 | ||
Browser
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 745
Karma: 578294
Join Date: Apr 2010
Location: Australia
Device: Kobo Touch, Kobo Aura HD
|
Quote:
Quote:
I think I'll just stick with the "none". ;-) |
||
![]() |
![]() |
![]() |
#14 | ||
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
Otherwise, the reader is not complying with SVG specifications. Quote:
|
||
![]() |
![]() |
![]() |
#15 | ||
Browser
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 745
Karma: 578294
Join Date: Apr 2010
Location: Australia
Device: Kobo Touch, Kobo Aura HD
|
Quote:
Quote:
|
||
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Are Two EPUB Covers possible? | DapperDG | ePub | 3 | 05-16-2013 01:56 PM |
Epub covers | drmar | Recipes | 1 | 03-03-2012 06:15 AM |
How to get ePub covers to display? | Antioch | ePub | 4 | 06-25-2011 03:00 AM |
Why no Covers in ePub from Kobobooks? | hpjrt | Kobo Reader | 7 | 12-18-2010 12:38 AM |
epub covers quirk? with 0.7.2 | Allis | Calibre | 4 | 06-24-2010 08:22 PM |