{"id":16286143,"url":"https://github.com/wieslawsoltes/trace","last_synced_at":"2025-03-20T02:31:35.020Z","repository":{"id":41117220,"uuid":"351204398","full_name":"wieslawsoltes/Trace","owner":"wieslawsoltes","description":"Trace is an application for transforming bitmaps into vector graphics using BitmapToVector library.","archived":true,"fork":false,"pushed_at":"2024-10-31T18:17:56.000Z","size":186862,"stargazers_count":17,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-17T13:54:36.302Z","etag":null,"topics":["avalonia","avaloniaui","bitmap","bmp","jpeg","path","png","potrace","skia","skiasharp","trace","tracing","vector"],"latest_commit_sha":null,"homepage":"https://wieslawsoltes.github.io/Trace/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wieslawsoltes.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}},"created_at":"2021-03-24T19:47:27.000Z","updated_at":"2025-03-07T18:05:28.000Z","dependencies_parsed_at":"2023-01-21T18:00:29.394Z","dependency_job_id":null,"html_url":"https://github.com/wieslawsoltes/Trace","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wieslawsoltes%2FTrace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wieslawsoltes%2FTrace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wieslawsoltes%2FTrace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wieslawsoltes%2FTrace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wieslawsoltes","download_url":"https://codeload.github.com/wieslawsoltes/Trace/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244538590,"owners_count":20468745,"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":["avalonia","avaloniaui","bitmap","bmp","jpeg","path","png","potrace","skia","skiasharp","trace","tracing","vector"],"created_at":"2024-10-10T19:42:23.407Z","updated_at":"2025-03-20T02:31:34.509Z","avatar_url":"https://github.com/wieslawsoltes.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Trace\n\n[![Build status](https://dev.azure.com/wieslawsoltes/GitHub/_apis/build/status/Trace)](https://dev.azure.com/wieslawsoltes/GitHub/_build/latest?definitionId=84)\n[![CI](https://github.com/wieslawsoltes/Trace/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/wieslawsoltes/Trace/actions/workflows/build.yml)\n\n[![GitHub release](https://img.shields.io/github/release/wieslawsoltes/trace.svg)](https://github.com/wieslawsoltes/trace)\n[![Github All Releases](https://img.shields.io/github/downloads/wieslawsoltes/trace/total.svg)](https://github.com/wieslawsoltes/trace)\n[![Github Releases](https://img.shields.io/github/downloads/wieslawsoltes/trace/latest/total.svg)](https://github.com/wieslawsoltes/trace)\n\nTrace is an application for transforming bitmaps into vector graphics using [BitmapToVector](https://github.com/daltonks/BitmapToVector) library.\n\n![](images/TraceGui.png)\n\n* [BitmapToVector](https://github.com/daltonks/BitmapToVector) C# port of Potrace with optional SkiaSharp support.\n* [Potrace](http://potrace.sourceforge.net/) Transforming bitmaps into vector graphics.\n* [mkbitmap](http://potrace.sourceforge.net/mkbitmap.html) Transform images into bitmaps with scaling and filtering.\n* [A detailed technical description of how the Potrace algorithm works.](http://potrace.sourceforge.net/potrace.pdf)\n* [Technical documentation of the Potrace library API (for developers).](http://potrace.sourceforge.net/potracelib.pdf)\n* [Avalonia - A cross platform XAML framework for .NET](http://avaloniaui.net/)\n\n# Usage\n\n### Turdsize\n\nThe turdsize parameter can be used to 'despeckle' the bitmap to be traced, by\nremoving all curves whose enclosed area is below the given threshold. The current default for the turdsize\nparameter is 2. Its useful range is from 0 to infinity.\n\n### Turnpolicy\n\nThe turnpolicy parameter determines how to resolve ambiguities during decomposition\nof bitmaps into paths. \n\nThe possible choices for the turnpolicy parameter are:\n- Black: prefers to connect black (foreground) components.\n- White: prefers to connect white (background) components\n- Left: always take a left turn.\n- Right: always take a right turn.\n- Minority: prefers to connect the color (black or white) that occurs least frequently in a local neighborhood of the current position.\n- Majority: prefers to connect the color (black or white) that occurs most frequently in a local neighborhood of the current position.\n- Random: choose pseudo-randomly.\n\nThe current default policy is `Minority`, which tends to keep visual lines connected.\n\n###  Alphamax\n\nThe alphamax parameter is a threshold for the detection of corners. It controls the\nsmoothness of the traced curve. The current default is 1.0. The\nuseful range of this parameter is from 0.0 (polygon) to 1.3334 (no corners).\n\n### Opticurve and opttolerance\n\nThe opticurve parameter is a boolean flag that controls whether Potrace will attempt to `simplify` the final curve by reducing the number of Bezier curve segments.\nOpticurve=1 turns on optimization, and opticurve=0 turns it off. The current default is on.\n\nThe opttolerance parameter defines the amount of error allowed in this simplification. The current default is 0.2. Larger values tend to decrease the number of\nsegments, at the expense of less accuracy. The useful range is from 0 to infinity, although in practice one would hardly choose values greater than 1 or so. For most\npurposes, the default value is a good tradeoff between space and accuracy.\n\n### Fill color\n\nThe fill color used for generated output path's. The default is hex value `#000000`. It also accepts named colors like `Red`, `Black` etc.\n\n### Color filter\n\nColor filter is an C# expression used to filter input bitmap colors. \nIt has access to Rgba32 pixel sctruct represantion.\n\nThe default filter is `c.R \u003c 128 \u0026\u0026 c.A \u003e 0` where `c` is variable of type `Rgba32`.\n\nAvailable `c` variable properties:\n- `c.R` Red\n- `c.G` Green\n- `c.B` Blue\n- `c.A` Alpha\n\n# Building\n\nDownload and install [.NET 5.0 SDK](https://dotnet.microsoft.com/download).\n\n### Build\n\n```bash\ndotnet build ./src/TraceGui/TraceGui.csproj -c Release\n```\n\n### Run\n\n```bash\ndotnet run --project ./src/TraceGui/TraceGui.csproj -c Release\n```\n\n# Licensing\n\nTrace is licensed under the [GPL-3.0 License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwieslawsoltes%2Ftrace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwieslawsoltes%2Ftrace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwieslawsoltes%2Ftrace/lists"}