Quote:
Originally Posted by bentleymaniac
BTW, is there an easy way to convert to svg?
|
GrannyGrump wrote a Text to SVG tutorial here:
https://www.mobileread.com/forums/sho...d.php?t=238029
Quote:
Originally Posted by fbrzvnrnd
SVG is XML. So it is hard "convert" a bitmap to a SVG.
|
fbrzvnrnd is correct. It is very similar like going from lossy (JPG) -> lossless (PNG/GIF) images.
Once you have crossed that threshold to a bitmap image... it is really hard/impossible to go back to a vector.
Quote:
Originally Posted by bentleymaniac
I tried Inkscape, but the output files are actually bigger than the png's. AND look cheesy.
|
Personally? I would only use SVGs if you have access to the original source files. Like if you had a computer-generated chart directly from the program that created it (or if you had access to the vector source... like an actual digital PDF (not a scan)).
On Looking Cheesy: Years ago I got sick of running across these tiny ant-sized horrible JPGs of formulas in the books. I wrote a "Formulas to PNG" Tutorial:
https://www.mobileread.com/forums/sho...d.php?t=223254
Here is the Before/After example posted:
Before: https://www.mobileread.com/forums/att...8&d=1380001474
After: https://www.mobileread.com/forums/att...7&d=1380001474
The Before was zoomed in on a PDF scan, and the After was me recreating the formulas digitally.
If you took Before image, and followed GrannyGrump's method (converting a bitmap to SVG paths)... the Before formula would still look like crap (and nowhere near as crisp as my After formula). Garbage In, Garbage Out...
Bitmaps to Paths: I was looking through the older topics (because this topic has definitely been brought up many times before), and I came across this one. Psymon was trying to generate sheet music:
https://www.mobileread.com/forums/sho...11#post2926711
You can see the difference between a "Traced" SVG created from a bitmap image:
https://www.mobileread.com/forums/att...1&d=1411067938
and a purely digital vector solution:
https://www.mobileread.com/forums/att...2&d=1411067938
On File Size: Depends on the image. SVGs are sometimes much larger than their equivalent (small resolution) bitmaps.
The advantage of a vector image though is that it stays the same exact file size and perfectly crisp no matter what the output size is.
For example, if you see this image:
https://commons.wikimedia.org/wiki/F...map_VS_SVG.svg
SVG: 3 KB
320x204 PNG: 22 KB
640x409 PNG: 49 KB
800x511 PNG: 59 KB
1024x654 PNG: 85 KB
1280x818 PNG: 100 KB
No matter which resolution you output the SVG, it will always be 3 KB. What if you wanted to generate that image for a 4K monitor?
4096x2567 PNG: 446 KB
while the SVG would always be 3 KB.
If you took the 650x409 PNG and resized it to 4K, it would look horribly fuzzy/pixelated.
Quote:
Originally Posted by bentleymaniac
or do you recommend using pngs and adding inline svg?
|
In your case, just stick with the cleaned up PNG.
Quote:
Originally Posted by bentleymaniac
It's just when I try to use inline svg, ADE displays the pictures in a peculiar, almost hatched/sketched, way.
|
Who knows what you are doing... you would have to give source files, show code examples, and explain how you created the SVGs.
ADE displays SVGs fine.
Quote:
Originally Posted by bentleymaniac
Does inline svg allow you to "pinch and zoom" on the images? The css method seems to prevent it.
|
That is another reason why I don't typically do SVGs in EPUBs. If you read the SVG Table topic, you would have seen the discussion + problems we ran across.
A lot of the devices don't play nicely with SVGs (like changing font color, and to my knowledge none of them allow you to "pinch and zoom" the SVG). They do look nice and crisp at any size though.