Mobileread
An Issue about a SVG wrapper
#1  RbnJrg 06-06-2013, 12:56 PM
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>
In Sigil (I always made my books as epub in Sigil and then I convert them by using Kindlegen) works fine but when I open the kf8 book in Kindle, the cover still has the two white stripes on the sides.

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
Reply 

#2  susan_cassidy 06-06-2013, 04:59 PM
.mobi doesn't support svg.
Reply 

#3  RbnJrg 06-06-2013, 05:42 PM
Quote susan_cassidy
.mobi doesn't support svg.
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.
Reply 

#4  Doitsu 06-06-2013, 05:59 PM
Quote RbnJrg
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?
It seems that KindleGen doesn't support html title pages at all. Each time I convert an ePub that has one, KindleGen displays the the following message:

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?
Reply 

#5  susan_cassidy 06-06-2013, 07:23 PM
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.
Reply 

#6  RbnJrg 06-06-2013, 08:15 PM
Quote Doitsu
It seems that KindleGen doesn't support html title pages at all. Each time I convert an ePub that has one, KindleGen displays the the following message:

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?
Hi Doitsu;

I got the following message:

Quote
advertencia(inputpreprocessor):W29008: Etiqueta rechazada por uso no adecuado: </image> en el archivo: E:\Tempmbp_7DD_6_6_14_36_D_DA_63C_A8C_1\OEBPS\Text \Portada.html línea: 0000014
It's in spanish but it says that the </image> tag is rejected by improper use. The number of the warning is W29008.

So, what will be the proper use of the <image>...</image> tag?
Reply 

#7  RbnJrg 06-06-2013, 08:20 PM
Quote susan_cassidy
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.
Hi Susan;

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.
Reply 

#8  GMcG 06-07-2013, 02:39 AM
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>.
Reply 

#9  neufsix 06-07-2013, 04:26 AM
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" />
Reply 

#10  neufsix 06-07-2013, 04:27 AM
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>
Reply 

  Next »  Last »  (1/3)
Today's Posts | Search this Thread | Login | Register