4 ms·
This is significant: it allows one programmatically to convert any raster image into a full-color vector drawing. (Think converting JPEGs into similar-looking
by cs702 14y ago
This is significant: it allows one programmatically to convert any raster image into a full-color vector drawing. (Think converting JPEGs into similar-looking but much smaller SVG-like files with one click.)
Designers would LOVE to have this functionality built into applications like Inkscape and Adobe Illustrator.
--
Edit: changed "SVGs" to "SVG-like files" per vlasta2's comment (thanks vlasta2!). Also changed "equal-looking" to "similar-looking," because the automatically-generated color gradients may not precisely match the original.
- vlasta2 14y agoWell, it certainly is impressive, but if I understood the video correctly, it actually requires different graphic primitives than SVG offers, so it would require a new format.
- ygra 14y agoThere is work underway in standardising this for SVG 2. But given the pace at which the standard process moves along it will still take some years :-)
- colanderman 14y agoI'm not sure that the resulting vector files will necessarily be "smaller". JPEG uses a decent compression algorithm, so its size is already pretty close to its actual information content (I'd wager within a factor of 2). A while back I did some experimenting with compressing line graphics (handwritten music notation specifically) as both CCITTv4 (a bi-level raster compression algorithm) and SVG/PS via potrace (a tracer program), and the file sizes were similar (if anything favoring CCITTv4).
- cs702 14y agocolanderman: I'm almost certain that the resulting vector files will be much smaller, because the algorithm substitutes subtle and complex color variations with much simpler color gradients that are only approximately similar and therefore have much less actual information content. PS. Note that the resulting vector files are not just smaller, but the drawing elements contained in them are by definition resolution-independent, so all curves, diagonal lines, and gradients will render beautifully and without artifacts at all image sizes. PPS. Also, note that music notation has no color gradients.
- colanderman 14y agoYes, but I can achieve roughly the same effect (reducing information content) with JPEG by reducing the image size or reducing the quality parameter. That's not an advantage that's unique to this vector transformation, much less an advantage it has over JPEG. Now it may be the case that "compressing" an image with this vector transformation results in less noticeable quality loss than a similar quality reduction with JPEG; but then I'd ask to see a comparison to more advanced image compression methods such as APT: http://intuac.com/userport/john/apt/ http://intuac.com/userport/john/apt/
- colanderman 14y agoRe: PS: Yes, I understand that, and I'm purposefully ignoring it because that information would only help my argument. Vector drawing elements are richer than raster drawing elements and hence tend to contain more information (e.g. "exactly how sharp is that edge?). And you will get artifacts going from raster->vector->zoom, because the raster->vector algorithm necessarily infers information that is simply not present (i.e. beyond the Nyquist boundary). While typically not apparent at 100% zoom, inaccuracies in this inference will become apparent once you zoom in (e.g. "that pixel was meant to represent a perfect square, not a circle!"). Re: PPS: I never claimed it did? Music notation is bi-level and smooth edges that makes it well-suited for vector tracing with a bi-level tracer e.g. potrace (and therefore -- again -- aiding your argument). Comparing a CCITTv4 bitmap -- a bi-level format -- to vector output from potrace -- a bi-level tracer -- would make no sense with color gradients. In case it's not clear, I'm making the analogy CCITTv4 : potrace :: JPEG : the diffusion curve algorithm.
- cs702 14y agocolanderman: Yes, I understand the analogy you're making. Your example of a pixel "meant to represent a perfect square, not a circle" is accurate: that is one type of information that gets discarded with this approach. Another type of information that gets discarded is complex/subtle color gradients/variations. Taken to the extreme, yes, this approach can make photos look like stylized comic-book drawings; but with sensible defaults, it produces resolution-independent images that look great (such as the example with the dolphin) even if those images actually contain LESS information than a JPEG at the same file size. We'll have to wait and see...
- pooyak 14y agoDid you try to compress the resulting SVG files? Gzipping them will usually make them 3-4x smaller.
- colanderman 14y agoYes -- IIRC this was with compressed PDFs generated from PostScript.
- mistercow 14y ago>Designers would LOVE to have this functionality built into applications like Inkscape and Adobe Illustrator. Apparently people have been discussing how to implement it in Inkscape for some time. The fact that there's no way to actually implement them with SVG seems to be a hurdle.