Stypox / image-to-gcode

Detects the edges of an image and converts them to 2D gcode that can be printed by a plotter
27 stars 10 forks source link

Error arguments are required: #3

Closed Azambek02 closed 1 year ago

Azambek02 commented 1 year ago

Hello I runing imagetogcode code but i have error: usage: image_to_gcode.py [-h] -i FILE -o FILE [--dot-output FILE] [-e MODE] [-t VALUE] image_to_gcode.py: error: the following arguments are required: -i/--input, -o/--output PS C:\imagetogcode>

Please help me

Stypox commented 1 year ago

Well, the message there is saying what you are missing: you should run the script with an "--input" parameter (i.e. the input file to read) and an "--output" parameter (i.e. the output file to write). For example:

python3 image_to_gcode.py --input INPUTFILE.png --output OUTPUTFILE.gcode

You can run python3 image_to_gcode.py --help to get information about other options. Note that these commands should be run in a terminal (you can't just double-click the program), and you might need to use python instead of python3.

Azambek02 commented 1 year ago

Thanks for your help. I will try again. I am newer to pyhon

Azambek02 commented 1 year ago

I was creating an image to gcode android app. can i use in your code using Chaquopy

Stypox commented 1 year ago

Yes, you should be able to use chaquopy. However I think you would be better off rewriting my code in Java or native C++ for the best performance, as Python on phones is slow and this project was never seriously optimized. Let me know how it works out ;-)