View Single Post
Old 06-13-2013, 09:42 AM   #2
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,711
Karma: 8700123
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by ghostyjack View Post
I know you can add a blank SVG file to an epub by right-clicking the Images folder in the Book Browser (I'm not sure why you would want a blank SVG file, but there must be a reason), but is there anyway of inserting a regular image file (jpg, png, etc) with an SVG wrapper?

I can never seem to build it correctly when I want to insert one, so if there is a method already baked into Sigil?

Would this be an example where using the clips could resolve this?
Last week I post a question about SVG wrappers in mobi files. Maybe that thread can be useful for you:

https://www.mobileread.com/forums/sho...d.php?t=215088

However, you can insert a SVG wrapper in Sigil by means of:

Code:
<div>
    <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 573 850" width="100%">
      <image height="850" width="573" xlink:href="../images/v_execution.png" />
    </svg>
 </div>
Of course, instead of "850" and "573" you'll have to write here (in the viewbox and inside the <image /> tag) the size of your image and also modify the path to it. Finally you can play with the variable "preserveAspectRatio". Here you can use not only "xMidYMid" but any combination of xMin-xMid-xMax and yMin-yMid-yMax and also to use "meet" or "slice". Watch the following image:



Regards
Rubén
RbnJrg is offline   Reply With Quote