Quote:
Originally Posted by odamizu
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.
|
As others have mentioned, the
SVG Wrapper allows the underlying image to stretch/expand
without distortion.
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:
Originally Posted by j.p.s
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.
|
But sadly, SVGs don't work in old MOBI. So you would have to create fallback images anyway. A real giant pain.
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.