jankovicsandras / imagetracerjs

Simple raster image tracer and vectorizer written in JavaScript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with tracing

blpraveen opened this issue · comments

I have created a jsfiddle of image convert to svg.
I am not able generate required svg images. After converted still shows text . I want only the block in color to be converted to svg not the text and the borders. I did not understand bit about options if possible to tweak. Can you help me?

Is it possible to ignore type="L" and consider only type="Q"?

Hi,

If you use the 'curvy' option preset or set a very small ltres in options, then almost all of the paths will be type Q.

seating_chart

I tried curvy option it better than previous generate. I am using above image. it has text in the image. is it possible to skip this as
well and keep only blocks or rectangles or trapezoid.

Is it possible to ignore white and black color text?

I want only the bounding box from convert?

Hi,

The bounding box would be the easiest. I suggest reading this example how to loop through layers and paths (You don't need the Simplify parts). Then you can just use the bounding box like this (pseudocode):

tracedata.layers[ layernumber ][ pathnumber ].boundingbox == [ topleft_x, topleft_y, bottomright_x, bottomright_y ]

I want Imagetrace data return not only axis but also fill color.

tracedata.palette == [ {r:...,g:...,b:...,a:...}, {r:...,g:...,b:...,a:...}, ... ]
where the number of the color matches the number of the layer, so the first color fills the first layer, the second color fills the secnond, and so on...

I hope these solved your issue. Feel free to reopen, if you have more questions.