abouttreesummaryrefslogcommitdiff
path: root/readme.md
diff options
context:
space:
mode:
authorPatrick2025-05-11 23:02:53 +0000
committerPatrick2025-05-11 23:02:53 +0000
commit9897015952a36a22eb679bda165018e88894b549 (patch)
tree6316eaeb342121525105acdba05058993365346d /readme.md
parentbb6cf7d350b76abddbfda37546b4979585db365f (diff)
downloadseparator-9897015952a36a22eb679bda165018e88894b549.tar.gz
separator-9897015952a36a22eb679bda165018e88894b549.zip
Add readem
Diffstat (limited to 'readme.md')
-rw-r--r--readme.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/readme.md b/readme.md
new file mode 100644
index 0000000..ff5cf5a
--- /dev/null
+++ b/readme.md
@@ -0,0 +1,19 @@
+# Separator
+
+Command line tool to separate an image into background and foreground
+
+## Usage
+
+./main <filename> <new_filename> <fg_color> <bg_color> <new_color>
+
+This will replace <fg_color> with <new_color> and make <bg_color> transparent.
+It only handles two colors but correctly interpolates between the two and adds transparency accordingly.
+Colors are entered as six hex digits without any annotations.
+
+## Example
+```bash
+./main img.png img_separated.png 000000 ffffff ff0000
+```
+
+This works with an image with a black foreground on a white background.
+The resulting image is red with a transparent background.