home | blog | art | now | git gpg | email | rss

morph

Generate xresources colors from an image.
git clone https://pollux.codes/git/morph.git
Log | Files | Refs | README | LICENSE
commit 8f5068ee106057673a70658fdf61e93b10e00ae7
parent 54428e420db18e30273d75d4b9955bba2409a766
Author: Pollux <pollux@pollux.codes>
Date:   Sun, 20 Jul 2025 20:29:48 -0500

feat: Accept image path from arguments

Signed-off-by: Pollux <pollux@pollux.codes>

Diffstat:
Mmorph.c | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/morph.c b/morph.c @@ -349,9 +349,14 @@ export_color(const char *name, col_lab_t color) { int main(int argc, char **argv) { + if(argc <= 1) { + printf("Need path to image.\n"); + return 1; + } + int pixel_count; col_rgb_t *image_pixels = - get_image_pixel_data("test.jpg", &pixel_count); + get_image_pixel_data(argv[1], &pixel_count); // TODO: White-balance colors first using GIMP algorithm