Moving / Floating images in Epub

2 posts / 0 new
Last post

Is it possible (and if not, will it ever be possible) to have full-page images that
1) automatically check the display ratio and adjust to be a full-screen image scaled to fit on one dimension with filler on the other dimension
2) float to the nearest/next page turn?

Example: I am converting a print book to epub. It has several full-page images. I want them to scale up to full screen without cropping or changing in aspect ratio. I also want them to "float" to the next page turn, instead of introducing a lot of white space on the previous page.

Are you asking if Readium supports or will support this, or is it permissible to do this in an EPUB? If the latter, this is Reading-System specific.  The EPUB spec does not specify how images should be scaled or placed on the page.

If you are asking if Readium supprts this, the answer is mixed.  Some of what you describe can be done, i.e. scaling the image to fit the page.

IN HTML, you can use:  img { max-width: 100%;padding: 0;margin: 0;}

An alternative approach is to use SVG:

<svg version="1.1" xmlns="" xmlns:xlink="" width="100%" height="100%" viewBox="0 0 592 900" preserveAspectRatio="xMidYMid meet">
<image width="592" height="900" xlink:href="images/page01.jpeg" />

As for floating the image on page turn, I am not clear what it is you are trying to do.  Can you explain further?

Secondary menu