forked from tTh/FloatImg
		
	not a milestone
This commit is contained in:
		
							parent
							
								
									538a8ffa82
								
							
						
					
					
						commit
						c3c5e0dc3f
					
				@ -7,6 +7,11 @@ LIBS = -lfloatimg -lpnglite -lm
 | 
			
		||||
OBJS = fonctions.o sfx.o crapulator.o
 | 
			
		||||
DEPS = fonctions.h crapulator.h
 | 
			
		||||
 | 
			
		||||
all:	fonderie interpolator
 | 
			
		||||
 | 
			
		||||
# ---------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
fonderie:	fonderie.c ${DEPS} ${OBJS} Makefile
 | 
			
		||||
	gcc ${COPT} $< ${OBJS} ${LIBS} -lz -o $@
 | 
			
		||||
 | 
			
		||||
@ -21,9 +26,10 @@ sfx.o:	sfx.c ${DEPS} Makefile
 | 
			
		||||
 | 
			
		||||
# ---------------------------------------------------------
 | 
			
		||||
#
 | 
			
		||||
#	another way...
 | 
			
		||||
#	another way to brotch some pics...
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
interpolator:	interpolator.c Makefile
 | 
			
		||||
	gcc ${COPT} $<  ${LIBS} -lz -o $@
 | 
			
		||||
interpolator:	interpolator.c ${OBJS} Makefile
 | 
			
		||||
	gcc ${COPT} $< ${OBJS}  ${LIBS} -lz -o $@
 | 
			
		||||
 | 
			
		||||
# ---------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
@ -67,6 +67,12 @@ criant de documentation...
 | 
			
		||||
 | 
			
		||||
## Interpolator
 | 
			
		||||
 | 
			
		||||
Un logiciel dont l'inspiration vient de Terre-Blanque, ça ne peut
 | 
			
		||||
pas être complètement malsain :)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## Conclusion
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
**Use the source, Luke**
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -11,7 +11,6 @@
 | 
			
		||||
#include  "crapulator.h"
 | 
			
		||||
 | 
			
		||||
/* -------------------------------------------------------------- */
 | 
			
		||||
/*	support function for the crapulator			  */
 | 
			
		||||
static int effect_3(FloatImg *image)
 | 
			
		||||
{
 | 
			
		||||
float		value;
 | 
			
		||||
@ -76,7 +75,6 @@ if (666==count) {
 | 
			
		||||
switch (idFx) {
 | 
			
		||||
	case 0:		/* DO NOTHING */
 | 
			
		||||
		retval = 0;			break;
 | 
			
		||||
 | 
			
		||||
	case 1:
 | 
			
		||||
		fimg_cos_01(image, image,
 | 
			
		||||
				fimg_get_maxvalue(image));
 | 
			
		||||
@ -99,15 +97,12 @@ switch (idFx) {
 | 
			
		||||
	case 6:
 | 
			
		||||
		fimg_killcolors_a(image, 0.0);
 | 
			
		||||
		break;
 | 
			
		||||
 | 
			
		||||
	case 7:
 | 
			
		||||
		retval = fimg_colors_mixer_a(image, 2.0);
 | 
			
		||||
		break;
 | 
			
		||||
 | 
			
		||||
	case 8:
 | 
			
		||||
		retval = insitu_ctr2x2(image);
 | 
			
		||||
		break;
 | 
			
		||||
 | 
			
		||||
	case 9:
 | 
			
		||||
		retval = fimg_classif_trial(image, image, 0.37, 0);
 | 
			
		||||
		if (retval) {
 | 
			
		||||
@ -115,11 +110,13 @@ switch (idFx) {
 | 
			
		||||
			exit(1);
 | 
			
		||||
			}
 | 
			
		||||
		break;
 | 
			
		||||
 | 
			
		||||
	case 10:
 | 
			
		||||
		retval = binarize(image, 0);
 | 
			
		||||
		break;
 | 
			
		||||
 | 
			
		||||
	case 11:
 | 
			
		||||
		retval = trinarize(image, 0);
 | 
			
		||||
		break;
 | 
			
		||||
			/* --- WTF -- */
 | 
			
		||||
	default :
 | 
			
		||||
		fprintf(stderr, "%s : effect #%d invalid\n", 
 | 
			
		||||
				__func__, idFx);
 | 
			
		||||
 | 
			
		||||
@ -40,6 +40,7 @@ int create_fifo(int nbslot, int w, int h, int t);
 | 
			
		||||
 *		funcs in 'sfx.c'
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
int trinarize(FloatImg *pimg, int notused);
 | 
			
		||||
int binarize(FloatImg *pimg, int notused);
 | 
			
		||||
 | 
			
		||||
int brotche_rand48_a(FloatImg *fimg, float ratio, float mval);
 | 
			
		||||
 | 
			
		||||
@ -14,9 +14,12 @@
 | 
			
		||||
 | 
			
		||||
#include  "../floatimg.h"
 | 
			
		||||
 | 
			
		||||
#include  "crapulator.h"
 | 
			
		||||
 | 
			
		||||
// XXX #include  "fonctions.h"
 | 
			
		||||
 | 
			
		||||
int		verbosity;
 | 
			
		||||
int		convert_to_gray;	/* needed by fonctions.c */
 | 
			
		||||
 | 
			
		||||
/* -------------------------------------------------------------- */
 | 
			
		||||
int interpolator(char *pattern, char *outdir, int Nsteps)
 | 
			
		||||
@ -63,10 +66,20 @@ for (idx=0; idx<globbuf.gl_pathc; idx++) {
 | 
			
		||||
		continue;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	/* here, we can insert the input filter */
 | 
			
		||||
	/* OK try it ... */
 | 
			
		||||
	foo = crapulator(&B, 8, 1.0);
 | 
			
		||||
	if (foo) {
 | 
			
		||||
		fprintf(stderr, "crapulator failure %d\n", foo);
 | 
			
		||||
		exit(1);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	for (step=0; step<Nsteps; step++) {
 | 
			
		||||
		coef = (float)step / (float)Nsteps;
 | 
			
		||||
		fimg_interpolate(pSecond, pFirst, &Out, coef);
 | 
			
		||||
 | 
			
		||||
		/* here we can insert the output filter */
 | 
			
		||||
 | 
			
		||||
		sprintf(line, "%s/%05d.png", outdir, ipng);
 | 
			
		||||
		foo = fimg_save_as_png(&Out, line, 0);
 | 
			
		||||
		if (foo) {
 | 
			
		||||
@ -84,7 +97,7 @@ for (idx=0; idx<globbuf.gl_pathc; idx++) {
 | 
			
		||||
	pTmp = pSecond;
 | 
			
		||||
	pSecond = pFirst;
 | 
			
		||||
	pFirst = pTmp;
 | 
			
		||||
	/* THIS CODE DON'T WORK !!! */
 | 
			
		||||
	/* XXX THIS CODE DON'T WORK !!! */
 | 
			
		||||
#endif
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,15 @@
 | 
			
		||||
 */
 | 
			
		||||
extern	int		verbosity;
 | 
			
		||||
 | 
			
		||||
/* -------------------------------------------------------------- */
 | 
			
		||||
int trinarize(FloatImg *pimg, int notused)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
fprintf(stderr, "the function '%s' is not implemented\n", __func__);
 | 
			
		||||
exit(2);
 | 
			
		||||
 | 
			
		||||
return -1;
 | 
			
		||||
}
 | 
			
		||||
/* -------------------------------------------------------------- */
 | 
			
		||||
int binarize(FloatImg *pimg, int notused)
 | 
			
		||||
{
 | 
			
		||||
@ -100,6 +109,3 @@ return 0;
 | 
			
		||||
}
 | 
			
		||||
/* -------------------------------------------------------------- */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user