02-14-2012, 07:06 PM | #1 |
Enthusiast
Posts: 37
Karma: 10
Join Date: Jul 2009
Location: Bucharest, Romania
Device: Kindle 3
|
<svg> to <img>
I am trying to convert a book from epub to mobi. As Kindle does not support SVG I am trying to convert these tags in the html from:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="100%" version="1.1" viewBox="0 11 600 800" width="100%"> <image height="800" transform="translate(0 0)" width="600" xlink:href="images/cover.jpg"/> </svg> to <img> but I do not know how. I tried: <img src="images/cover.jpg" height="800" width="600" /> However the images is now not centered in the web browser and it affects how it looks on Kindle too. What's the correct translation from svg to img? These are not svg images anyway. |
02-14-2012, 08:45 PM | #2 |
Zealot
Posts: 128
Karma: 238654
Join Date: Aug 2009
Device: Kobo Mini (4GB), Nook Classic wi-fi, iPod Touch (Bluefire Reader)
|
You need to center the image using CSS. I would do something like this,
Code:
<div class="center"><img src="images/cover.jpg" height="800" width="600" /></div> And this, Code:
.center { text-align:center; } |
Advert | |
|
02-15-2012, 03:58 PM | #3 |
Enthusiast
Posts: 37
Karma: 10
Join Date: Jul 2009
Location: Bucharest, Romania
Device: Kindle 3
|
Thanks, it worked like a charm
|
02-23-2012, 11:09 AM | #4 |
Enthusiast
Posts: 29
Karma: 22
Join Date: Oct 2010
Location: London
Device: Kindle, iPad, iPhone 4, HTC Desire
|
Here is a good example of a clean cover page.
Code:
<?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" xmlns:xml="http://www.w3.org/XML/1998/namespace"> <head> <title></title> <style> .sjfixer { margin: 0; padding: 0; text-align:center;} </style> </head> <body class="sjfixer"> <p class="sjfixer"><img src="cover.jpg" alt="" height="100%" /></p> </body> </html> |
02-23-2012, 02:53 PM | #5 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
I personally use an image inside a SVG wrapper to resize the image proportionaly according to the screen size.
|
Advert | |
|
02-28-2012, 08:21 AM | #6 |
Enthusiast
Posts: 29
Karma: 22
Join Date: Oct 2010
Location: London
Device: Kindle, iPad, iPhone 4, HTC Desire
|
|
02-28-2012, 08:53 AM | #7 | |
Grand Sorcerer
Posts: 27,903
Karma: 198500000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Your point is taken, of course, but you can hardly condemn this fairly standard ePub practice without making the assumption that every single ePub is also a mobi source document. So yes, if making a single (easily maintained) source document to use for ePub and MOBI is high on your list of priorities, then it's best to not use the SVG wrapper. Otherwise... there's absolutely no reason not to use it in an ePub. Last edited by DiapDealer; 02-28-2012 at 09:11 AM. |
|
02-28-2012, 02:49 PM | #8 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
|
03-01-2012, 08:54 PM | #9 |
Resident Curmudgeon
Posts: 75,892
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Use Calibre to make the Mobi. Then you won't have to change the cover XML.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
grab the big-ones (img) | schuster | Recipes | 8 | 05-19-2011 02:09 PM |
<img longdesc= | traskilajussi | EPUBReader | 3 | 02-23-2011 08:15 AM |
vfat.img | pewterbot9 | enTourage Archive | 11 | 12-29-2010 06:41 PM |
Can you decompile an IMG file? | Nate the great | Android Devices | 3 | 06-06-2010 07:37 AM |
PRS-900 Help! Who can help me to pack the opt.img | alansuyalun | Sony Reader | 5 | 05-08-2010 09:25 PM |