Giter VIP home page Giter VIP logo

color_trace's People

Contributors

aonozan avatar migvel avatar scribblemaniac avatar texnicii avatar wesalius avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

color_trace's Issues

"Tracing complete!" but no output file!

I'm passing the following command to convert a JPG to SVG but it's not generating any new file in the output directory:

python3 color_trace_multi.py --input="/content/logo.jpg" --output="/content/color-results" --colors=2

Long path not possible until this fix is added.

When providing an output path without quotes, the program does not recognize the argument. When quotes are provided when the output file is saved in the wrong directory, because the quotes are interpreted as part of the path.

I am not a python expert but this way it works just fine

Add this code to the main function ( def main(args=None): ) to line 883:

output_pattern =output_pattern.strip('\"\'')
inputs_outputs = zip(*get_inputs_outputs(args.input, output_pattern))

This will let the script work with long paths quoted.

After that the script can be called with quotes without problems e.g. :
python3 color_trace_multi.py -i "path1" -o "path2" -q as -c 32 -s

Error with comand line sintax

I'm trying to run the windows version, with this command line:
color_trace_multi -i png\*.png -o svg\* -c 0
But al i got is this error:
[Errno 2] No such file or directory: 'svg\\accept~tmp_scaled.png'
The path svg is created and accessible, so i can't figure out the error...

Can anybody help on this one?
Thanks

Cant convert gif to svg

python script gives below error while o convert gif to svg

Process color_trace worker #2:
Traceback (most recent call last):
  File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/var/www/html/apps/server/src/../public/color_trace/color_trace_multi.py", line 748, in process_worker
    q1_job(q2, total, layers, settings, **job_args)
  File "/var/www/html/apps/server/src/../public/color_trace/color_trace_multi.py", line 641, in q1_job
    raise e
  File "/var/www/html/apps/server/src/../public/color_trace/color_trace_multi.py", line 615, in q1_job
    quantize(this_scaled, this_reduced, settings['colors'], algorithm=settings['quantization'], dither=settings['dither'])
  File "/var/www/html/apps/server/src/../public/color_trace/color_trace_multi.py", line 141, in quantize
    with open(src, 'rb') as srcfile:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpwb9prs3z/0~scaled.png'

How to pass -i and -o as different file path

Hi,
in my ubuntu os, i tried with
python3 /var/www/html/apps/color_trace/color_trace_multi.py -i /var/www/html/apps/color_trace/test.png -o /var/www/html/apps/color_trace/after.svg -c 8 but its gives error
color_trace_multi.py: error: argument -i/--input: expected at least one argument

-c 0 is the only way that I get an output

Hi,
the only way I get any vectorizing done by this is script is using -c 0 option, if I change the value to anything else, I get just "Tracing complete!" but no output... Could you explain please?

Omit BG

Is there a way to omit the BG from the SVG?

Proper Run Command Formatting for Windows?

Hello!

Could someone paste the command they're running in their terminal when working on a Windows machine? I haven't been able to get mine to run without errors and I can't tell if it's because I don't understand the formatting of the run command or if something is actually wrong. Thanks so much!

TypeError: can't pickle weakref objects

Hello;
the module threw "TypeError: can't pickle weakref objects" today at line 801 p.start()

As I have only very simple graphics (black + white + transparent), is it possible without greater rework, to remove the multiprocessing?
I took a look at your code today and it seems to be a big part of your code.

Here's a dump of the error trace

my code:
ctm.color_trace_multi(inputs=picpath,
outputs=outpath,
colors = 1,
processcount = 1)

error:
Traceback (most recent call last):

File "", line 4, in
processcount = 1)

File "C:\Users\Andreas\25 Heroquest\Questimator\Code\Multicolor_Symbols\color_trace_multi.py", line 801, in color_trace_multi
p.start()

File "C:\Users\Andreas\Anaconda3\lib\multiprocessing\process.py", line 105, in start
self._popen = self._Popen(self)

File "C:\Users\Andreas\Anaconda3\lib\multiprocessing\context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)

File "C:\Users\Andreas\Anaconda3\lib\multiprocessing\context.py", line 322, in _Popen
return Popen(process_obj)

File "C:\Users\Andreas\Anaconda3\lib\multiprocessing\popen_spawn_win32.py", line 65, in init
reduction.dump(process_obj, to_child)

File "C:\Users\Andreas\Anaconda3\lib\multiprocessing\reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)

python instead of python3

EDIT
Hello,
i had some problems to use color_trace, the main problem was that i was using python in the terminal instead of python3 !

The correct syntax for me is:

linux@pop-os:~/Downloads/color_trace-master$ python3 color_trace_multi.py -i test.png -o test.svg  -c 8
Tracing complete!

Thank you for the project!

Carriage return in shebang line

Best explained with a demonstration:

[stephan@host:~/src/color_trace]$ ./color_trace_multi.py 
/usr/bin/env: ‘python\r’: No such file or directory

\r characters are Evil.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.