last commit from outerspace
This commit is contained in:
parent
3eed90c3e7
commit
1b598227c3
@ -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 $<
|
||||
|
||||
|
@ -2,3 +2,7 @@
|
||||
|
||||
Need more explanations...
|
||||
|
||||
|
||||
|
||||
## Converting to/from rgb or gray
|
||||
|
||||
|
23
lib/alphachan.c
Normal file
23
lib/alphachan.c
Normal file
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* alphachan.c
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#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;
|
||||
}
|
||||
/* ---------------------------------------------------------------- */
|
@ -1,5 +1,7 @@
|
||||
/*
|
||||
* fimg-2gray.c
|
||||
*
|
||||
* This is a tricky job...
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
@ -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 */
|
||||
|
5
lib/t.c
5
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
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* This thing is just a mess !
|
||||
* ***************************
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -112,6 +113,10 @@ if (experiment) {
|
||||
|
||||
if (to_gray) {
|
||||
foo = fimg_desaturate(&accu, &accu, 0);
|
||||
/* ?
|
||||
* but here, final picture is in RGB shape, so export give us
|
||||
* also an image rgb-shaped. this is not optimal, I think.
|
||||
*/
|
||||
if (foo) {
|
||||
fprintf(stderr, "desaturate: error %d\n", foo);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user