View Single Post
Old 03-20-2010, 09:28 AM   #85
Hamlet53
Nameless Being
 
Something not mentioned?

Quote:
Originally Posted by pdurrant View Post
By using XHTML and putting images in an svg wrapper, it's possible to get the images to resize to fill an entire page of the ebook reader, in proportion and centred. Here's the full xhtml file for my cover image.

The trick that made it work compared to my previous tries seems to be explicitly giving the picture width and height in the image object, to match the size of the viewBox. Previously I'd used 100% in there.


<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="../styles/style001.css" type="text/css" />

<title></title>
</head>

<body>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 573 800" preserveAspectRatio="xMidYMid meet">
<image width="573" height="800" xlink:href="../images/img0032.png" />
</svg>
</body>
</html>
This is such a great idea I would really like to use it. The problem is that when I try it in an epub book and then view it in Sony reader there is only a blank where the image should be. What am I missing? The code I am inserting is the exact same except for file path and image file name.
  Reply With Quote