Mobileread
question about images in epubs
#1  beejsbj 03-04-2021, 04:58 PM
HI, so i have an epub with images in it. i want to make it so all the images size up to fill the screen regardless of device, like how the cover does.

i've been doing some reading and googling about it and apparently wrapping the image in svg does the trick

was just hoping if there's a way to automatically place all images within said book into svg wrappers? through maybe a software that does it? or app or plugin for calibre or sigil? whatever works.

thanks
Reply 

#2  Turtle91 03-05-2021, 09:28 AM
There is a Sigil Plugin to insert images with an SVG wrapper.

I exclusively use svg wrappers whenever I want a full page image as you describe. But my books are only for my personal use, and my reader of choice, Marvin, handles them perfectly. However, some of the older kindles don't like svg in anything but the cover image. Make sure you are checking your targeted reader/device for compatibility. There are some work-arounds if your targeted device does not handle them...search here on MR for multiple discussions on the topic.

Cheers!

edit:
I have the svg wrapper coding set as a clip in Sigil, so I click on the button, and then just add the image width, height, and filename.

Quote
<body style="margin:0; padding:0; text-align:center; background-color:black">

<div style="margin:0; padding:0">
<svg
xmlns="http://www.w3.org/2000/svg"
height="100vh" width="100vw"
preserveAspectRatio="xMidYMid meet" version="1.1"
viewBox="0 0 [WIDTH] [HEIGHT]"
xmlns:xlink="http://www.w3.org/1999/xlink">
<image width="[WIDTH]" height="[HEIGHT]" xlink:href="../Images/[FILENAME]"/>
</svg>
</div>
</body>
Reply 

#3  beejsbj 03-05-2021, 06:23 PM
thanks a lot tutle91, mine are for personal use too. i have an andriod and moon reader works well.


so just a quick question though, what exactly am i putting into the height and width fields? sorry im relatively noobish at this.

i do have a ton of images that i want to wrap up, so this will be quiet tedious. i know theres a plugin but ive no idea how to put it into my Sigil.
Reply 

#4  Turtle91 03-05-2021, 07:31 PM
The width and height are the dimensions of the image in pixels. If you use the plugin, I think it puts those numbers, and the filename, in automatically. If you use the clip function, then you would find the dimensions by opening the image (after loading it into Sigil) by double clicking on the file in the Images folder on the left of the coding window. Scroll to the bottom of the image and you will see the dimensions and the file size.

To install a Sigil plugin:
Quote
Download the plugin to your desktop or other readily remembered location
(do not unzip the plugin)

Open Sigil, click on Plugins and then click on Manage Plugins. Then click on the Add Plugin button, browse to the plugin zip file, select it and let it install. Once it is installed, assign it to one of plugin buttons.

You don't need to unzip the file, Sigil will take care of that.
There are lots of people in the Sigil forum that can give more detailed explanations if you need it.

Cheers!
Reply 

Today's Posts | Search this Thread | Login | Register