diff --git a/lib/Makefile b/lib/Makefile index 3ffea72e..9fadac31 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -7,7 +7,7 @@ COPT = -Wall -Wextra -fpic -g -no-pie -DDEBUG_LEVEL=0 OBJS = fimg-core.o fimg-pnm.o fimg-file.o fimg-math.o \ fimg-timers.o operators.o fimg-2gray.o \ interpolate.o fimg-compare.o contrast.o \ - metadata.o + metadata.o alphachan.o DEPS = Makefile ../floatimg.h @@ -24,6 +24,9 @@ t: t.c ../libfloatimg.a $(DEPS) ../libfloatimg.a: $(OBJS) $(AR) r $@ $? +alphachan.o: alphachan.c $(DEPS) + gcc $(COPT) -c $< + fimg-core.o: fimg-core.c $(DEPS) gcc $(COPT) -c $< diff --git a/lib/README.md b/lib/README.md index ee05c620..1f9bb6bf 100644 --- a/lib/README.md +++ b/lib/README.md @@ -2,3 +2,7 @@ Need more explanations... + + +## Converting to/from rgb or gray + diff --git a/lib/alphachan.c b/lib/alphachan.c new file mode 100644 index 00000000..0ceee386 --- /dev/null +++ b/lib/alphachan.c @@ -0,0 +1,23 @@ +/* + * alphachan.c + */ + +#include +#include +#include + +#include "../floatimg.h" + +extern int verbosity; /* must be declared around main() */ + +/* ---------------------------------------------------------------- */ +int fimg_add_alpha_chan(FloatImg *img) +{ +return -4; +} +/* ---------------------------------------------------------------- */ +int fimg_kill_alpha_chan(FloatImg *img) +{ +return -4; +} +/* ---------------------------------------------------------------- */ diff --git a/lib/fimg-2gray.c b/lib/fimg-2gray.c index 948d3d0e..a83d7144 100644 --- a/lib/fimg-2gray.c +++ b/lib/fimg-2gray.c @@ -1,5 +1,7 @@ /* * fimg-2gray.c + * + * This is a tricky job... */ #include @@ -29,7 +31,6 @@ else { /* ... and canonic random values */ kr = kg = kb = 1.0; } - kdiv = kr + kg + kb; /* we must check the validity of our parameters */ diff --git a/lib/t.c b/lib/t.c index 6a4b8625..4ec094b8 100644 --- a/lib/t.c +++ b/lib/t.c @@ -86,6 +86,11 @@ fprintf(stderr, " %f %f\n", A, B); return 0; } /* ---------------------------------------------------------------- */ +int essai_alphachan(void) +{ + +return -1984; +} /* ---------------------------------------------------------------- */ #define WI 1024 #define HI 768 diff --git a/tools/cumulfimgs.c b/tools/cumulfimgs.c index bd086a1e..26efa200 100644 --- a/tools/cumulfimgs.c +++ b/tools/cumulfimgs.c @@ -1,5 +1,6 @@ /* * This thing is just a mess ! + * *************************** */ #include #include @@ -103,15 +104,19 @@ for (idx=optind; idx