vtracer icon indicating copy to clipboard operation
vtracer copied to clipboard

Default output from webapp doesn't match cmdapp

Open jsscheller opened this issue 2 years ago • 1 comments

I am getting vastly different results when using the webapp vs the cmdapp. I was expecting them to be the same, but maybe that is not the case? Do you have any advice regarding how to get similar output from the cmdapp as the webapp?

Input image: cat

Webapp output: export-2022-08-17 205335

Cmdapp output: out

The command I called (argument values match the webapp):

vtracer
    --filter_speckle=4
    --color_precision=6
    --gradient_step=16
    --mode=spline
    --corner_threshold=60
    --segment_length=4
    --splice_threshold=45
    --hierarchical=stacked
    --colormode=color
    --input=cat.png
    --output=out.svg
vtracer --version
visioncortex VTracer 0.4.0

jsscheller avatar Aug 17 '22 20:08 jsscheller

Seems like the clustering step produces nothing. Can you try one of the presets, i.e. poster?

tyt2y3 avatar Aug 18 '22 01:08 tyt2y3

I tried the poster preset as well as the others but it didn't change the output.

jsscheller avatar Aug 19 '22 17:08 jsscheller

Oh then it can be down to how the image crate decodes image differently than the browser, specifically something about the alpha channel? e.g. I don't think it can handle indexed alpha

tyt2y3 avatar Aug 29 '22 16:08 tyt2y3

You are correct. Adding a background solves the issue. Thanks!

jsscheller avatar Aug 29 '22 20:08 jsscheller