{"id":13809425,"url":"https://github.com/LingDong-/linedraw","last_synced_at":"2025-05-14T08:31:48.415Z","repository":{"id":43751139,"uuid":"86761008","full_name":"LingDong-/linedraw","owner":"LingDong-","description":"Convert images to vectorized line drawings for plotters.","archived":false,"fork":false,"pushed_at":"2023-07-22T09:07:03.000Z","size":2674,"stargazers_count":766,"open_issues_count":6,"forks_count":105,"subscribers_count":25,"default_branch":"master","last_synced_at":"2024-10-30T20:53:56.334Z","etag":null,"topics":["artwork","convert-images","drawing","plotter"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LingDong-.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-03-31T00:18:34.000Z","updated_at":"2024-10-29T14:09:18.000Z","dependencies_parsed_at":"2023-02-01T10:15:14.809Z","dependency_job_id":"a2f3e4ff-93fe-48be-8b19-6e700a3ad953","html_url":"https://github.com/LingDong-/linedraw","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LingDong-%2Flinedraw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LingDong-%2Flinedraw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LingDong-%2Flinedraw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LingDong-%2Flinedraw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LingDong-","download_url":"https://codeload.github.com/LingDong-/linedraw/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254104701,"owners_count":22015524,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artwork","convert-images","drawing","plotter"],"created_at":"2024-08-04T02:00:25.522Z","updated_at":"2025-05-14T08:31:43.398Z","avatar_url":"https://github.com/LingDong-.png","language":"Python","funding_links":[],"categories":["Software","line drawing","Python"],"sub_categories":["Vector Creation"],"readme":"# linedraw\nConvert images to vectorized line drawings for plotters.\n![Alt text](./screenshots/1.png?raw=true \"\")\n\n- Exports polyline-only svg file with optimized stroke order for plotters;\n- Sketchy style powered by Perlin noise;\n- Contour-only or hatch-only modes.\n\n## Dependencies\nPython 2 or 3, PIL/Pillow, numpy, OpenCV (Optional for better performance)\n\n## Usage\nConvert an image to line drawing and export .SVG format:\n\n```shell\n$ python linedraw.py -i input.jpg -o output.svg\n```\nCommand specs:\n\n```\nusage: linedraw.py [-h] [-i [INPUT_PATH]] [-o [OUTPUT_PATH]] [-b] [-nc] [-nh]\n                   [--no_cv] [--hatch_size [HATCH_SIZE]]\n                   [--contour_simplify [CONTOUR_SIMPLIFY]]\n\nConvert image to vectorized line drawing for plotters.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -i [INPUT_PATH], --input [INPUT_PATH]\n                        Input path\n  -o [OUTPUT_PATH], --output [OUTPUT_PATH]\n                        Output path.\n  -b, --show_bitmap     Display bitmap preview.\n  -nc, --no_contour     Don't draw contours.\n  -nh, --no_hatch       Disable hatching.\n  --no_cv               Don't use openCV.\n  --hatch_size [HATCH_SIZE]\n                        Patch size of hatches. eg. 8, 16, 32\n  --contour_simplify [CONTOUR_SIMPLIFY]\n                        Level of contour simplification. eg. 1, 2, 3\n```\nPython:\n\n```python\nimport linedraw\nlines = linedraw.sketch(\"path/to/img.jpg\")  # return list of polylines, eg.\n                                            # [[(x,y),(x,y),(x,y)],[(x,y),(x,y),...],...]\n                                            \nlinedraw.visualize(lines)                   # simulates plotter behavior\n                                            # draw the lines in order using turtle graphics.\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLingDong-%2Flinedraw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLingDong-%2Flinedraw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLingDong-%2Flinedraw/lists"}