]>
| description | Command line tool to separate a picture into foreground and background |
| last change | Sun, 11 May 2025 23:04:54 +0000 (23:04 +0000) |
Command line tool to separate an image into background and foreground
bash
./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.
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.
| 2025-05-11 | Patrick | Update readem main | commit | commitdiff | tree | snapshot |
| 2025-05-11 | Patrick | Add readem | commit | commitdiff | tree | snapshot |
| 2025-05-11 | Patrick | Initial commit | commit | commitdiff | tree | snapshot |
| 6 months ago | main | shortlog | log | tree |