Quote:
Originally Posted by cybmole
ok - but that would mean hacking the original book code which is not always legal ( think ade-epub library loans)
I suppose I ought to learn how to do it really though
so lets see. what do I have to change in code like this, & can I automate it with regex ?
typical epub code for an map image witin a story:
Code:
<p class="toc"><img alt="Description: cyprus" class="calibre5" src="../Images/image002.jpg" /></p>
I got the long para bug several time within Anne Rice's Interview with a Vampire. apart from that it has not really troubled me. I't's probably in all the Anne Rice vampire series but just one book was more than enough for me , I doubt I could crawl through another 
|
Here's what I use to wrap images when I want them to display as large as possible without aspect ratio changes.
Code:
(in the epub section file)
<style type="text/css">
@page {padding: 0pt; margin:0pt}
body { text-align: center; padding:0pt; margin: 0pt; }
</style>
</head>
<body class="nomargin">
<div class="svgwrapper">
<svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 1521 2338" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink">
<image height="2338" width="1521" xlink:href="../Images/cover.jpg"></image>
</svg>
</div>
(in the stylesheet)
.nomargin {
display : block;
text-align : center;
margin : 0 0 0 0;
padding : 0 0 0 0;
}
.svgwrapper {
display: block;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
text-align: center;
}
Some of this is overkill since I'm setting the margins and padding to 0 multiple times but it works for me across multiple devices. Since there are relatively few full page images in most ebooks, I just copy and paste the code above, copy and paste the name of the image file, set the size (though strictly more setting the aspect ratio) and go from there. Oddly many ebooks use the svg wrapper for the cover image but set PreserveAspectRatio to "none" which does fill the screen but also distorts the image.
You might want to take a look at Liz Castro's Pigs, Gourds and Wikis site. While she is iPad oriented, quite a bit of her content applies to all ereaders.
Regards,
David