02-20-2018, 07:29 PM | #1 |
just an egg
Posts: 1,697
Karma: 5514284
Join Date: Mar 2015
Device: Kindle, iOS
|
SVG images - why?
I have been long confused by SVG and would like to understand.
What is the benefit of wrapping a cover jpg (or any image) in SVG code? I've seen ebooks with cover images without SVG; and other ebooks wrap the cover jpg in SVG. SVG also seems to be the default for Sigil and Calibre. But when I load these ebooks onto my iDevices (reading with an epub app) or Kindle (after converting epub via KindleGen) both seem to work fine, and I'm not understanding the advantage of SVG. Google has not been helpful in enlightening my poor brain, and I would really like to learn this. Thank you. |
02-20-2018, 07:57 PM | #2 |
Grand Sorcerer
Posts: 6,752
Karma: 86500093
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
A "SVG wrapper" is sometimes applied to an image in order to scale it as large as possible on a page without distortion. This is not possible using just using HTML because screens can have widely differing aspect ratios.
This does nothing for the cover of a kindle book because Amazon uses just the underlying image and ignores the HTML or SVG coding of the cover page. Another unrelated use of SVG is to provide images that can scale large or small without becoming pixelated. This is used for things like charts and equations, rather than photographic images. |
02-20-2018, 09:05 PM | #3 |
Resident Curmudgeon
Posts: 76,433
Karma: 136564696
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Speaking of Amazon and covers, Amazon really doesn't want you to see the cover of the book you are reading.
|
02-20-2018, 10:42 PM | #4 | |
just an egg
Posts: 1,697
Karma: 5514284
Join Date: Mar 2015
Device: Kindle, iOS
|
Quote:
Am I understanding correctly that the general advantage of SVG is that it reduces distortion and pixelization? But SVG makes no difference when it comes to cover images in Kindle books? Does SVG make a difference for non-cover images in KF8? Thank you for any enlightenment you can offer |
|
02-20-2018, 11:16 PM | #5 | ||
Grand Sorcerer
Posts: 6,752
Karma: 86500093
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
It is difficult to explain. Perhaps someone else will jump in with a better description.
Quote:
Quote:
I believe that it can also be used for that purpose, but I do not have experience with that. Use of SVG in anything but the cover can sometimes prevent a kindle book from supporting enhanced typesetting. Last edited by jhowell; 02-20-2018 at 11:29 PM. |
||
02-20-2018, 11:49 PM | #6 | ||
just an egg
Posts: 1,697
Karma: 5514284
Join Date: Mar 2015
Device: Kindle, iOS
|
Quote:
Quote:
Can SVG in non-cover images cause problems with KF8? |
||
02-21-2018, 12:20 PM | #7 | ||
Grand Sorcerer
Posts: 6,752
Karma: 86500093
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
Quote:
Quote:
|
||
02-21-2018, 01:20 PM | #8 | |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Quote:
Dale |
|
02-21-2018, 05:04 PM | #9 |
Grand Sorcerer
Posts: 5,528
Karma: 100606001
Join Date: Apr 2011
Device: pb360
|
I don't know whether SVG images can cause problems with KF8, but I do know that SVG images that are actually made with vectors instead of pixels can look great in KF8 books.
In the thread https://www.mobileread.com/forums/sh...d.php?t=288215, post #27 has an epub book with SVG images attached, and post #34 has the same book converted to KF8. You can extract the images from either and view them in a web browser and see how they keep looking better the more you zoom. Post #1 in that thread has the original epub with PNG images and you can see how those start looking bad fast with zooming. The epub in post #1 with SVG images has no use except as an example of how not to put SVG images in an epub. |
02-21-2018, 06:51 PM | #10 |
just an egg
Posts: 1,697
Karma: 5514284
Join Date: Mar 2015
Device: Kindle, iOS
|
Thanks all! I think SVG may be more than my simple brain can handle.
What prompted my question is that I was poking around the Sigil forums when I came across the nifty plugin “InsertImageSVG” (plugin to insert and wrap an image with SVG). I then thought, “gee, maybe I should start wrapping all my images in SVG code!” But while that seems to have benefits for ePub, it looks like it may have disadvantages for ePubs that will be converted to KF8??? (And it definitely has potential for interfering with conversion to KFX, which is not a real concern for me since I’m a KF8 gal, but still worth noting.) So maybe I shouldn’t go crazy with the SVG plug-in? (Note also that I’m just talking about wrapping jpg and png in SVG code, not in using SVG images, which is definitely more than my simple brain can handle ) Last edited by odamizu; 02-21-2018 at 06:55 PM. |
02-23-2018, 12:04 AM | #11 | ||
Wizard
Posts: 2,304
Karma: 12587727
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
This differences really stand out when you have Tall/Skinny or Fat/Short images, OR you turn your device from Portrait->Landscape. For example: Example 1 (SVG Wrapper vs. HTML Width) [Portrait] You can see the SVG Wrapper stays the proper ratio: but the HTML version that stretches to "100% width/height of the screen" starts turning into an oompa loompa: Example 2 (SVG Wrapper vs. HTML Width) [Landscape] The problem becomes much worse when you turn the device to landscape. You can see the SVG Wrapper keeps the ratio correct: but the HTML Width+Height version gets severely distorted: while the HTML Width version gets chopped off and flies off the screen: Quote:
I still recommend having the SVG sources though, so in the future you could generate higher quality/resolution images (like in my Formulas to PNG tutorial). Though an absolutely fantastic post you referenced if I do say so myself. Last edited by Tex2002ans; 02-23-2018 at 12:13 AM. |
||
02-23-2018, 02:35 AM | #12 |
just an egg
Posts: 1,697
Karma: 5514284
Join Date: Mar 2015
Device: Kindle, iOS
|
@Tex2002ans: Thank you so much for these examples! As they say, a picture paints a thousand words
|
02-24-2018, 03:51 PM | #13 |
just an egg
Posts: 1,697
Karma: 5514284
Join Date: Mar 2015
Device: Kindle, iOS
|
I ran a few quick tests and see, indeed, how images in EPUBs benefit from an SVG wrapper.
KF8 seems to handle SVG wrappers okay, too (in my limited, quick testing). However, when the Kindle Publishing Guidelines say "SVGs not supported in iOS," they aren't kidding! Kindle for iOS will totally ignore images wrapped in SVG code, i.e., the image will be missing and the page will be blank! So it seems if an ebook will at any point be read on Kindle for iOS, images (or at least non-cover images) should not be wrapped in SVG code. So much for my brief foray into SVG. But it was worth it to better understand SVG, and for that I once again thank you all! |
02-28-2018, 06:07 PM | #14 | |
Wizard
Posts: 1,571
Karma: 11380098
Join Date: Aug 2010
Location: NE Oregon
Device: Kobo Sage, Pocketbook Era, Kobo Forma, Kindle Oasis 2
|
SVG images - why?
Quote:
True, but there's a workaround so the page won't be blank. If you use title tags within your SVG, the text within *will* show up on Kindle for iOS. I know this because I like to do my title page text/images as SVG, but I make a habit of always using title tags to list title and author, as apps that don't support SVG usually will render the text, thus avoiding the blank page look. Less useful though in instances where you NEED the image content to be seen. I wonder WHY Kindle for iOS doesn't support SVG though, seems crazy when Kindle for Android has no issues. Does Apple not allow Amazon to support SVG or has Amazon just been lazy with the iOS app? Sent from my iPad using Tapatalk Last edited by graycyn; 02-28-2018 at 06:15 PM. |
|
03-01-2018, 01:42 AM | #15 | |
Wizard
Posts: 2,304
Karma: 12587727
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
|
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Scaling images with SVG wrapper | Pablo | ePub | 4 | 07-07-2015 02:44 PM |
SVG images not going into the e-book | bkleine | Conversion | 1 | 11-23-2014 10:01 PM |
Touch SVG Images Often Appear as Black Rectangles | MikeWV | Kobo Reader | 3 | 07-09-2014 02:13 PM |
blank pages after SVG images in Kobo | jobalcaen | ePub | 3 | 05-19-2013 02:19 PM |
can I use SVG images in mobi? | sarah_pnix | Kindle Formats | 4 | 01-07-2013 05:21 PM |