not ready for prime time
This commit is contained in:
parent
fdc2544ad1
commit
7c1ad9633a
@ -9,6 +9,7 @@
|
||||
|
||||
#include "fonctions.h"
|
||||
#include "crapulator.h"
|
||||
#include "glitches.h"
|
||||
|
||||
/* -------------------------------------------------------------- */
|
||||
static int effect_3(FloatImg *image)
|
||||
@ -118,7 +119,7 @@ switch (idFx) {
|
||||
break;
|
||||
/* --- WTF -- */
|
||||
case 25:
|
||||
retval = vertical_singlitch(image, 250, fval, 18, 0);
|
||||
retval = vertical_singlitch(image, 250+rand()%15 , fval, 18, 0);
|
||||
break;
|
||||
default :
|
||||
fprintf(stderr, "%s : effect #%d invalid\n",
|
||||
|
@ -16,6 +16,7 @@
|
||||
|
||||
#include "../floatimg.h"
|
||||
|
||||
#include "fonctions.h"
|
||||
#include "glitches.h"
|
||||
#include "crapulator.h"
|
||||
#include "metriques.h"
|
||||
@ -83,10 +84,12 @@ if (method) {
|
||||
qsort(idxvalues, nombre, sizeof(IdxValue), cmp_idxvalues);
|
||||
}
|
||||
|
||||
for (idx=0; idx<nombre; idx++) {
|
||||
printf("%5d %9.6f %5d\n", idx,
|
||||
idxvalues[idx].value, idxvalues[idx].idx);
|
||||
fflush(stdout);
|
||||
if (verbosity) {
|
||||
for (idx=0; idx<nombre; idx++) {
|
||||
printf("%5d %9.6f %5d\n", idx,
|
||||
idxvalues[idx].value, idxvalues[idx].idx);
|
||||
fflush(stdout);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -115,7 +118,6 @@ memset(&globbuf, 0, sizeof(glob_t));
|
||||
foo = glob(pattern, 0, NULL, &globbuf);
|
||||
fprintf(stderr, "globbing '%s' -> %d, %ld files found\n",
|
||||
pattern, foo, globbuf.gl_pathc);
|
||||
|
||||
if (0 == globbuf.gl_pathc) {
|
||||
fprintf(stderr, "%s : no file found, aborting\n", __func__);
|
||||
return -1;
|
||||
@ -135,8 +137,11 @@ w = iarray[0], h = iarray[1];
|
||||
fprintf(stderr, "first image size : %dx%d\n", w, h);
|
||||
|
||||
fimg_create(&A, w, h, 3); pFirst = &A;
|
||||
// brotche_rand48_a(&A, 0.10, 250.555);
|
||||
fimg_create(&B, w, h, 3); pSecond = &B;
|
||||
// brotche_rand48_a(&B, 0.10, 250.555);
|
||||
fimg_create(&Out, w, h, 3);
|
||||
// brotche_rand48_a(&Out, 0.10, 250.555);
|
||||
|
||||
ipng = 0;
|
||||
for (idx=0; idx<globbuf.gl_pathc; idx++) {
|
||||
|
15
Fonderie/t.c
15
Fonderie/t.c
@ -4,6 +4,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "../floatimg.h"
|
||||
#include "glitches.h"
|
||||
@ -13,8 +14,8 @@
|
||||
int verbosity;
|
||||
|
||||
#define PNG "out.png"
|
||||
#define W 512
|
||||
#define H 256
|
||||
#define W 800
|
||||
#define H 600
|
||||
#define LMAX 233.333
|
||||
#define TIMER 1
|
||||
|
||||
@ -34,15 +35,17 @@ if (foo) {
|
||||
fprintf(stderr, "err %d create image\n", foo);
|
||||
exit(1);
|
||||
}
|
||||
fimg_vdeg_a(&image, LMAX);
|
||||
|
||||
srand(getpid());
|
||||
debut = fimg_timer_set(TIMER);
|
||||
|
||||
for (iter=0; iter<64; iter++) {
|
||||
for (iter=0; iter<72; iter++) {
|
||||
|
||||
for (bloub=0; bloub<5; bloub++) {
|
||||
fimg_vdeg_a(&image, LMAX);
|
||||
|
||||
for (bloub=0; bloub<7; bloub++) {
|
||||
xloc = rand() % W;
|
||||
omega = (float)(0.1 + drand48()*0.8) * 0.5;
|
||||
omega = (float)(0.1 + drand48()*0.6) * 0.4;
|
||||
foo = vertical_singlitch(&image, xloc, LMAX,
|
||||
omega, (float)iter);
|
||||
if (foo) abort();
|
||||
|
Loading…
Reference in New Issue
Block a user