Commit Graph

34 Commits

Author SHA1 Message Date
Chris Tsang
cc43924601 cargo fmt 2023-11-12 20:38:01 +00:00
Chris Tsang
9dbbd100df Bump 2023-11-12 20:36:35 +00:00
linkmauve
37a2570f49 Add a function to do in-memory conversion (#59)
* Move path handling out of conversion functions

This lets us decouple file reading/writing from the actual conversion.

* Move Config::from_args() to main.rs

* Remove path support from Config

Instead the input_path and output_path have to be passed to
convert_image_to_svg() manually.

* Add a simplified convert() function

This lets the user convert an image from memory, without encoding it to
PNG, writing it to a file, then reopening this file and decoding it
using the image crate.

It also allows the user to not write a SVG directly to a file.
2023-11-13 04:28:05 +08:00
Chris Tsang
b2cd1a9524 Expose as rlib too 2023-10-24 08:43:37 +01:00
Chris Tsang
5f5a6c6648 README 2023-09-23 11:45:36 +01:00
Chris Tsang
022018beb2 0.6.1 2023-09-23 11:12:34 +01:00
Chris Tsang
cc39c8c5ca README 2023-09-23 11:06:18 +01:00
Evan Jones
fa1ab68ef3 Python Bindings. Again. No, really! (#55)
* - Cargo.toml:  add `crate-type = ["cdylib"] to [lib]; lacking this is what was causing the executable to be put in wheels
- pyproject.toml: add "python-binding" to features for conditional compilation
- main.rs:  `cargo build` was failing for the vtracer executable; I think the previous import scheme had an implicit dependency on the library being built and called 'vtracer'. The other way to do this would have been to add an explicit dependency to the [[bin]], but making explicit imports here solves things directly

* re-enable linux builds; features are defined in the pyproject.toml now rather than in the workflow arguments

* And publish Linux, too!
2023-09-23 02:10:04 +08:00
Chris Tsang
1080c562ce Try again 2023-09-16 19:27:30 +01:00
Chris Tsang
e44e750721 try again 2023-09-16 19:09:20 +01:00
Chris Tsang
05f5b51db0 Add xml comment 2023-09-17 16:24:33 +01:00
Chris Tsang
f5cce867f2 python again 2023-09-16 17:59:52 +01:00
Chris Tsang
f71dd47907 python release 2023-09-16 17:47:04 +01:00
Chris Tsang
914e4ab875 python release 2023-09-16 14:51:26 +01:00
Chris Tsang
f35df1f6b2 0.6.0 2023-09-16 14:35:49 +01:00
Evan Jones
f4c7828049 Python bindings configured correctly for PyPI releases (#54)
* Python bindings sep 2023 (#52)

* Added maturin-based Python binding, to be deployed to https://pypi.org/project/vtracer/

* Removed poetry mentions from pyproject.toml, added README_PY.md for use on PYPI

* ->   v0.6.1
-> moved Python bindings to bottom of converter.rs

* - README_PY.md needed to be inside the cmdapp directory to display on PyPi.irg
->  v0.6.3

* Move code around

* Edit Readme

* Edit RELEASES.md

* Feature guard

* Build wheels with the cmdapp/Cargo.toml rather than top-level Cargo.toml

* use cmdapp/Cargo.toml for all Maturin CI actions, which causes Github to build all platforms python wheels and submit a new release to PyPI

* Bump to 0.6.4 for new PyPI release with all platforms' wheels included

* PyPI didn't accept a 'linux_aarch64' wheel for a release. For the moment, remove the platform until I can convince the action to build 'manylinux_aarch64' or the like

* Version bump while I work out CI & PyPI release wrinkles

* Maturin authors say `compatibility = "linux"` in pyproject.toml is causing PyPI failure. Replacing with "manylinux2014"

* bump to v0.7.0 in preparation for release from original vtracer repo

---------

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2023-09-17 06:24:13 +08:00
Chris Tsang
685009bd21 Allow filter_speckle to be 0 #47 2023-06-30 05:45:35 +08:00
Chris Tsang
82284ab470 0.5.0 2022-10-09 18:01:35 +08:00
Chris Tsang
ead104f0ce Tweak should_key_image 2022-10-09 17:21:00 +08:00
zachwolfe
a7219fd370 Alpha channel handling in CLI (#23)
* Support transparent color images

* Remove unnecessary conditional

* Add temporary git url to visioncortex dependency

* Use fastrand instead of rand

* Reduce the number of random iterations when keying

* Add heuristic to avoid expensive calculations for non-transparent input

* Add three additional special keying colours

* Add transparency check to some inner pixels
2022-10-09 15:41:43 +08:00
Oskar Skuteli
2448dbb3ba fix docs typo (#25) 2022-09-25 15:06:19 +08:00
Wolfgang Meyers
47091b0bf5 Fix deprecation warning from converter.ts 2022-02-10 18:13:51 -08:00
Chris Tsang
8439cc995d Refactor path_precision 2021-07-27 21:01:20 +08:00
Chris Tsang
c2a5626afa 0.4.0 2021-07-23 23:35:54 +08:00
Bobby Ng
d0593e716a SVG path string numeric precision 2021-07-23 23:35:45 +08:00
Chris Tsang
97ac767844 0.3.0 2021-01-24 21:31:55 +08:00
Chris Tsang
0b37051d40 Cutout mode 2021-01-24 21:31:08 +08:00
Chris Tsang
433a68d6d6 Update to visioncortex 0.4.0 2020-12-19 01:34:01 +08:00
Chris Tsang
20187e0993 0.2.0 2020-11-15 16:27:37 +08:00
Chris Tsang
5f18837b61 Relative & compound path 2020-11-09 00:38:44 +08:00
Chris Tsang
ba0ab63a92 vtracer 0.1.1 2020-11-01 14:54:33 +08:00
Chris Tsang
3df69f6274 svg namespace 2020-11-01 14:52:44 +08:00
Chris Tsang
cbb6c97ce4 Publish to crates.io 2020-10-31 18:49:45 +08:00
Sanford Pun
0c4fa1d742 CMD app 2020-10-31 17:42:04 +08:00