![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,622
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
An Issue about a SVG wrapper
Hi friends;
I have an image of 1200px (height) x 800px (width) that I want to use as a cover for a .kf8 book. In Kindle, that image is resized as 800 x 533 and like the Kindle screen is 800 x 600, then the cover appears with two white stripes on the sides. I thought to fix that issue by using the image in a SVG wrapper. Since the title (of the book/cover) is in the top/center, in "preserveAspectRatio" I used "xMidYMin slice" with the following code: Code:
<div> <svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMin slice" version="1.1" viewBox="0 0 800 1200" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink"> <image height="1200" width="800" xlink:href="../Images/Cover.jpg"></image> </svg> </div> It seems that Kindle doesn't support the SVG wrapper; can anyone of you tell me if has the same problem as me or if I'm doing something wrong? Thank you very much in advance. Rubén |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,251
Karma: 3720310
Join Date: Jan 2009
Location: USA
Device: Kindle, iPad (not used much for reading)
|
.mobi doesn't support svg.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,622
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Hi Susan, thanks for answering. When you say .mobi, do you mean .kf8 (.azw3) books? Because according to the Kindle Publishing guidelines, point 3.6.10, it seems that .azw3 supports SVG wrappers.
Last edited by RbnJrg; 06-06-2013 at 05:57 PM. |
![]() |
![]() |
![]() |
#4 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,679
Karma: 23983815
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Info(prcgen):I1052: Kindle support cover images but does not support cover HTML. Hence using the cover image specified and suppressing cover HTML in content. I usually ignore it, because I rmanually resize my covers to 600 x 800 before I add them to the epub. Do you get the same message? |
|
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,251
Karma: 3720310
Join Date: Jan 2009
Location: USA
Device: Kindle, iPad (not used much for reading)
|
I don't know about kf8. Just .mobi. I don't know if the .mobi part of a .kf8 file would support the svg cover. I understand that a full kf8 file has a .mobi part and a kf8 part, for readers that can't support kf8 format.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,622
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
I got the following message: Quote:
So, what will be the proper use of the <image>...</image> tag? ![]() |
||
![]() |
![]() |
![]() |
#7 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,622
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
I'm building a mobi book for K4NT that supports .kf8. It's as you say, kindelgen generates a mobi file that contains both a version for older Kindle models (a mobi7 book) and new ones (a mobi8 books). According to the Kindle Publishing guidelines, mobi8 books can support svg wrapper. Last edited by RbnJrg; 05-15-2014 at 07:14 PM. |
|
![]() |
![]() |
![]() |
#8 |
Writer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 101
Karma: 590630
Join Date: Mar 2011
Location: Munich, Germany
Device: none
|
My understanding is, that preserveAspectRatio means, that the proportions of the picture shall be kept the same even on a smaller display.
Your original image with 1200 x 800 has an aspect ratio of 3 : 2. The kindle has a display with 800 x 600, which is 4 : 3. So the picture is shown correctly with 800 x 533 (3 : 2). Without those white stripes at the sides (height=100% and width=100%) you would get a distortion and not a preserved aspect ratio. So it is either height=100% or width=100% if the display has different proportions. You don't get both. If you can risk the distortion try it without wrapper but with height=100%, width=100% in the img tag. George Edit: There is no closing tag for <image> like it is with <p>.....</p> or <h1>.....</h1>. Delete </image>. Last edited by GMcG; 06-07-2013 at 08:06 AM. |
![]() |
![]() |
![]() |
#9 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 57
Karma: 1010
Join Date: Jul 2011
Device: Archos A70 eReader, Kindle Touch, Sony PRS-T2
|
RbnJrg,
The proper user of the <image> tag is <image />. Here is what I used : <image height="901" width="552" xlink:href="../images/u_reves.png" /> |
![]() |
![]() |
![]() |
#10 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 57
Karma: 1010
Join Date: Jul 2011
Device: Archos A70 eReader, Kindle Touch, Sony PRS-T2
|
Here is the full file
Code:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ops="http://www.idpf.org/2007/ops" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <head> <title></title> <style type="text/css"> </style> <meta content="application/xhtml+xml; charset=utf-8" http-equiv="Content-Type"/> </head> <body style="margin-top: 0px; margin-left: 0px; margin-right: 0px; margin-bottom: 0px; text-align: center;"> <div> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 573 850" width="100%"> <image height="850" width="573" xlink:href="../images/v_execution.png" /> </svg> </div> </body> </html> Last edited by Jellby; 06-07-2013 at 07:05 AM. Reason: fixed markup |
![]() |
![]() |
![]() |
#11 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,622
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
The fact to use a SVG wrapper is in order that an image, no matter its size, is able to occupy a full screen, no matter its size -without distortion- since in this case, I'm using in "preserveAspectRatio" the value "slice". Of course, since the aspect ratio is preserved, then just only one part of the full image is showed, in this case, the "xMid-yMin" part of it. If you do the try of using a SVG wrapper in Sigil, you'll see how the image changes its size to fill the entire "ViewBook" area no matter the size of this last one. If you, manually, change the size of the ViewBook area, also will change the size of the image, without distortion, to occupy the full area. In this case, it seems that this feature is not supported in the .azw3 format ![]() |
|
![]() |
![]() |
![]() |
#12 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,622
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
You are right; the proper use of the <image> tag is <image />. It's Tidy that erroneously reforms my code, changing <image /> in <image></image>. What is surprising is that by using <image>...</image> the book passed the test of FligthCrew. By using the <image /> tag, now Kindlegen doesn't show the warning message, but still the cover continues to show the two white stripes on the sides ![]() ![]() Rubén |
|
![]() |
![]() |
![]() |
#13 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Quote:
Dale |
|
![]() |
![]() |
![]() |
#14 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,622
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
You can achieve locking the aspect ratio and avoid white lines on the sides ![]() ![]() Regards Rubén |
|
![]() |
![]() |
![]() |
#15 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 78,936
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
That behavior sounds dreadful. The best thing to do is to make the image fit the screen with the correct aspect ratio and not some small piece of the image.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Applescript Wrapper Application for Kindlegen | pdurrant | Kindle Formats | 50 | 02-18-2020 01:16 AM |
Kindlestrip Python script and AppleScript wrapper | pdurrant | Kindle Formats | 137 | 08-15-2017 01:16 AM |
Nook Simple Touch Glowlight - technological issue or quality-control issue? | Dr. Drib | Barnes & Noble NOOK | 1 | 12-04-2012 01:32 PM |
KindleCover: AppleScript wrapper and Python script application | pdurrant | Amazon Kindle | 6 | 12-02-2012 07:14 AM |
.PDB Encrytpion tool/"F-Format Wrapper Package"/Published Data | arvinder | Workshop | 0 | 08-20-2007 04:17 AM |