05-17-2019, 08:01 AM | #1 |
Connoisseur
Posts: 80
Karma: 2112464
Join Date: May 2019
Device: Kobo Aura One LE
|
Replace titlepage.xhtml
Hello,
In order to have the cover image scaled on the full screen of the device without scaling the actual image, I would like Calibre to use by default my own version of the titlepage.xhtml file in all conversions done. How can I do this? Or how can I otherwise achieve the same thing? Thank you! |
05-17-2019, 08:24 PM | #2 |
Wizard
Posts: 1,086
Karma: 6719822
Join Date: Jul 2012
Device: Palm Pilot M105
|
See this thread and the comments from Turtle91 about using an SVG container.
https://www.mobileread.com/forums/sh...d.php?t=319808 |
05-17-2019, 09:26 PM | #3 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
the default svg template does do full screen images and you can control whether it preserves aspect ratio or not via settings.
|
05-18-2019, 02:20 PM | #4 |
Connoisseur
Posts: 80
Karma: 2112464
Join Date: May 2019
Device: Kobo Aura One LE
|
Thank you both. I was reading an epub in KOReader and I got the cover rendered unscaled. And I imagined it was calibre's fault. But calibre reader renders the cover correctly. So it appears to be KOReader's fault.
|
05-18-2019, 03:14 PM | #5 | |
Well trained by Cats
Posts: 29,803
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
IIRC The default Cover setting is per format Preferences: Conversion: <format>: <settings that affect covers> The Above is for New devices. Once a device (driver) has been used, calibre stores it as it was at the time. Connect your device, then on the device icon (only shows when connected): Configure driver. Make the changes THERE |
|
05-19-2019, 04:18 AM | #6 |
Connoisseur
Posts: 80
Karma: 2112464
Join Date: May 2019
Device: Kobo Aura One LE
|
I generate the cover with Calibre default procedure, at a size of 600x800. The cover has text-only metadata - author, title, series - formatted in my own preferred way.
The output profile is set to tablet, to avoid further scaling. The default titlepage.xhtml I am using uses this svg sequence: <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%" viewBox="0 0 600 800" preserveAspectRatio="none"> <image width="600" height="800" xlink:href="cover.jpeg"/> </svg> I would prefer a way to have the cover scaled by the epub reader without specifying a specific size within this svg sequence. |
05-19-2019, 04:46 AM | #7 |
Connoisseur
Posts: 80
Karma: 2112464
Join Date: May 2019
Device: Kobo Aura One LE
|
I mean, I would like to have the cover image set to 600x800 and the ebook reader do the image scaling to its own display size.
|
05-19-2019, 10:24 AM | #8 |
Well trained by Cats
Posts: 29,803
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
The thing with that code that leaps out: jpeg
Covers in the Calibre Library bear name (cover.jpg), and are embedded that way if you have calibre add/update the jacket. IF you block that action, you probably broke the link I prefer a maintained aspect (preserveAspectRatio="xMidYMid meet"), but the width="100%" height="100%" part makes it scale to the screen (the default Calibre jacket, 'just works'. If it does't, then something is wrong 1)your manual code has errors. 2) The device folk 'know better' and override the code.) |
05-19-2019, 10:55 AM | #9 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
the size in the svg is meaningless. it simply sets up the correspondence between the image and the svg viewport. The image will still be scaled byt he reader to fit th escreen
|
05-19-2019, 02:38 PM | #10 |
Wizard
Posts: 1,086
Karma: 6719822
Join Date: Jul 2012
Device: Palm Pilot M105
|
On my todo list to read: https://wiki.mobileread.com/wiki/SVG
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Some files.html & toc.xhtml (also Cover.xhtml) | chaot | Workshop | 23 | 02-13-2017 12:20 PM |
Cover as titlepage | vdHummes | Recipes | 0 | 12-13-2015 08:22 AM |
calibre's inserted cover file, titlepage.xhtml | rhino79 | Calibre | 7 | 05-01-2015 02:27 PM |
Titlepage images accessibility? | graycyn | Workshop | 6 | 01-26-2013 02:43 PM |
Custom code in ePub titlepage.xhtml | Mrs_Often | Conversion | 6 | 07-24-2012 12:36 PM |