Quote:
Originally Posted by Psymon
Well, I couldn't seem to figure out how to do it -- not using Illustrator, anyway. :/
|
I am not extremely familiar with Illustrator... the few experiences I have had with it have been extremely negative. Adobe always seems to want to promote their own format (in this case, their vector format is .ai files), and try to tie you into "Adobe's way or the highway".
Perhaps there are ways to strip the SVG down, similar to the "Save for Web" on JPGs/PNGs... in Inkscape, you are able to save vector files as "Plain SVG", which strips out a bunch of the extra cruft. Perhaps there is something similar in Illustrator.
Side Note: I really have an aversion to the entire proprietary ecosystem... I hate being tied into one version of the software, where the file formats are not very portable between OTHER outside programs. Similar thing with DOC(X)s and Microsoft Office.
Quote:
Originally Posted by Psymon
In any case, though, I still don't get the rationale for doing it in SVG instead of PNG anyway. I do realize that the former is vector and the latter raster, but nevertheless in the context of ebooks the quality is not only negligible, but virtually indiscernible.
|
Similar reasons why I favor HTML Tables over images of tables (See Post #5):
https://www.mobileread.com/forums/sho...d.php?t=223062
Or very similar to the reasons I give for creating/generating higher resolution formulas instead of creating ant-sized thumbnails (I mentioned it in my Formulas to PNG Tutorial).
I also mentioned a lot of the disadvantages of SVG in the MobileRead topic I linked to in Post #8 of this topic.
I don't want to go through all the same reasons again, and again, but here is the main gist:
While the bitmap images might look ok on the surface FOR NOW, they will look worse in the future. You can stave it off temporarily by generating much higher resolution bitmap images, but that is only pushing the ball down the road one step. What happens when the next-next higher resolution device comes out? Why spend more time generating a higher resolution PNG of course!
One of the largest disadvantages of bitmap images is if you scale up/down, they can look like crap (especially when dealing with text in images). Since vector images are generated by mathematics (points, lines, curves, etc.), it will continue to look crisp no matter what the resolution.
Side Note: Here is a site I thought was informative, focusing on Web Design using SVG icons:
http://www.smashingmagazine.com/2012...ence-with-svg/
Initially, the file size of a vector file
may be larger, but doing it this way is forward-looking, for when screens/devices become higher and higher resolution. The SVG icons will continue to look crisp, while PNG/bitmap icons will begin to suffer negative effects.
Quote:
Originally Posted by Psymon
IAnd then there's the compatibility issue (if one wants to convert to MOBI format).
|
Indeed, if you go MOBI, you will be forced into a PNG fallback. This is one of the reasons why I haven't pushed that way in my EPUBs (although I have made it simple for me to substitute in new code in the future). Although you seem to be iBooks iBooks iBooks, and hand-crafted, hand-crafted, hand-crafted. From what I gather, you don't mind spending hours and hours doing tweaks to multiple formats to make things "perfect".
For work, I sort of have to design "one EPUB to rule them all." So sadly, I have to err on the side of "compatibility" over "superiority."
I haven't had as much time to dedicated towards researching SVG as I have wanted to.
Quote:
Originally Posted by Psymon
And then there's the file size issue (as I mentioned last time, for that one image I did in both formats, the SVG one was almost 20x the size of the PNG one).
[...]
Seems like I have multiple reasons for going with PNG instead, and the only reason to go with SVG is because it's vector -- and yet, you don't even notice any difference in quality anyway, so that's hardly an argument in its favour at all. 
|
A lot of it is dependent on how exactly the vector image was created as well... was this scanned in, and then changed to paths? Or did you create this file from scratch?
If you zoom in very closely to a "bitmap -> vector" SVG, you can see the lines are very jaggy/wobbly. The SVG has to take into account ALL of those scanning imperfections with math. This bloats the file size drastically.
If you generated a vector file straight from a digital source (for example, the output from MuseCore or MusiXTeX), the vector music sheets generated from that would be MUCH smaller in size.... because a straight line would actually be a straight line (a simple draw a line from A to B as thickness X).
I have attached a few SVGs I created for a book about a year ago, David Osterfeld, "Freedom, Society and the State" (I believe I showed these off previously on the forums).
I handcrafted these in Inkscape by tracing over the graphs manually (and I had no clue what I was doing.

).
The 8 SVGs are similar in size compared to the 8 extremely optimized PNGs:
SVGs: 115 KBs
PNGs: 114 KBs
The biggest advantage of SVG is that on a small device, big device, medium device, the image will scale/look crisp and crystal clear no matter the resolution of the device. That 115 KBs of SVGs will stay the same no matter what.
Compare this to the PNGs, where if I wanted to generated EVEN HIGHER resolution PNGs, the size of the file would only go up from there.
If you want to see some comparison shots, I showed off a 3 Before/After images of the original PDF scan + my LaTeX version of the book in this post:
https://www.mobileread.com/forums/sho...6&postcount=60
Converting the original scans to vector made the images infinitely easier/cleaner, and now I can generate PDFs/PNGs easy as pie, at any size, with ZERO loss.
Side Note: Take a look at that ZIP of the PNGs + SVGs. The SVGs got compressed down to ~15% their uncompressed size, while the PNGs only got compressed by a few KBs. SVGs won't add as much size to the final EPUB as the comparable PNGs. This really adds up when you have A TON of images in the book.
I also included the original PNGs I cropped out of the scan just so you could compare.
Quote:
Originally Posted by Psymon
I think I'll just stick with plain ol' PNGs for this particular thing I've been working on.
|
Understandable. I came to the same conclusions for now. Inserting it in EPUBs as bitmap is the most compatible, but definitely keep generating clean vector files in mind. It makes it WAY easier to just generate higher resolution bitmap images in the future if needed, and will make it easy as pie to just plop in the vector files when vector support gets better/easier. Do the work properly NOW, and it will save you a bunch more work in the future.