Tracing a raster image
Date: August 23, 2015, 09:32:22 AM
|Summary: to a vector image with seamless tiles representing pixels. Based on tiled clones.
This tutorial shows how to avoid rendering "gaps".
Partially mentioned in the raster and vector compare,
and as explained in this article, rendering can produce gaps if vector objects sharing the same edges.
This is a working example, how to deal with the problem when tracing a raster image to separate "pixels".
In general this tutorial is more about showing how to overlap tiles, rather than a way of practical bitmap tracing.
For the note it has nothing to do with the new trace pixelart feature, nor would it automagically convert a raster image to a form of art.
Also this case the raster image in its original format should be significantly smaller in file size than the svg after the tracing.
This svg shows the gaps,
most notably at 25%, 33%, 67%, 75%, 125%, 175% zoom levels through browsers:
This one is "filled up":
How they differ:
Note that, even if the horizontal-vertical raster is rendered right in 1., if the image is rotated, it does show the issue regardless the zoom level.
On 3., you can see the parts of the second image broken apart.
Each tile overlaps the neighboring one.
Here is in detail, how to achieve that:
-original svg source-
Important in 2., that the fill is not "no paint set" but "unset", resulting in undefined fill attribute.
fill and stroke tab
Another one at 3., is that you have to untick the box "use saved size and position of the tile"
in the tiled clone's trace tab for correct colour values.
Another note to add, tiled clones works up to 500/500 tiles, meaning the largest image you can make in one go with this method is 500 px / 500 px.
Try not to use too large images or you can end up with serious lagging.
Rating: This article has not been rated yet.
||January 11, 2016, 07:46:45 PM|
Hhmm....it's hard to create this gap with extreme colors like black and white. Easier to see the gap when colors are similar. Maybe don't need to fix the gap at all, if colors are extreme??
||January 11, 2016, 07:13:20 PM|
If we have 2 objects side by side, let's say one's black and one's white (extremes). Would it be better to "underlap" the white under the black, or the black under the white? What if it's a black and white checkerboard? I wonder if it would make a difference?
Hhm, can't attach images in this comment section. But I'll still test anyway, and report.