Compare commits

..

No commits in common. "12347e90669d7fb88b65e1f2f2963c4210f611b7" and "1f1398f9f2ee62467e6a22627b87243d7a3eddff" have entirely different histories.

4 changed files with 15 additions and 25 deletions

View File

@ -20,7 +20,7 @@
* https://git.tetalab.org/tTh/FloatImg
*/
#define FIMG_VERSION (229)
#define FIMG_VERSION (227)
#define RELEASE_NAME ("noname")
#define PATCH_LEVEL ("aaaa")
@ -269,7 +269,7 @@ int fimg_displacement_0(FloatImg *psrc, FloatImg *pdst, int flags);
/* module funcs/rampes.c */
int fimg_hdeg_a(FloatImg *img, double dcoef);
int fimg_vdeg_a(FloatImg *img, double dcoef);
int fimg_do_stripes(FloatImg *img, float fmax, int mode);
int fimg_do_stripes(FloatImg *img, int mode);
/* FIMG native file module */
int fimg_fileinfos(char *fname, int *datas);

View File

@ -23,11 +23,6 @@ fprintf(stderr, ">>> %s ( %p %p 0x%04x )\n", __func__, psrc, pdst, flags);
if (flags) { fprintf(stderr, "flags: 0x%04x in %s\n", flags, __func__); }
if (fimg_images_not_compatible(psrc, pdst)) {
fprintf(stderr, "%s: shit happen\n", __func__);
return -2;
}
for (y=0; y<psrc->height; y++) {
for (x=0; x<psrc->width; x++)

View File

@ -62,18 +62,15 @@ for (x=0; x<img->width; x++) {
return 0;
}
/* --------------------------------------------------------------------- */
/* nouveau 19 septembre 2022
*
* 6 octobre 2023 : rajout du parametre 'fmax'
*/
/* nouveau 19 septembre 2022 */
int fimg_do_stripes(FloatImg *img, float fmax, int mode)
int fimg_do_stripes(FloatImg *img, int mode)
{
int x, y, quad;
float *ligne;
float fr, fg, fb;
fprintf(stderr, ">>> %s ( %p %f %d )\n", __func__, img, fmax, mode);
fprintf(stderr, ">>> %s ( %p %d )\n", __func__, img, mode);
/*
* allocate and fill a lookup table
@ -82,10 +79,8 @@ if (NULL==(ligne=malloc(img->width*sizeof(float)))) {
fprintf(stderr, "%s: malloc fail\n", __func__);
exit(1);
}
for (x=0; x<img->width; x++) {
for (x=0; x<img->width; x++)
ligne[x] = (float)x / (float)img->width;
ligne[x] *= fmax;
}
/*
* build the pixels

View File

@ -183,7 +183,7 @@ switch(type) {
case T_TPAT0: fimg_test_pattern(&fimg, 0, fvalue); break;
case T_MIRCOL1: fimg_mircol_1(&fimg, fvalue); break;
case T_BLOUP: fimg_draw_something(&fimg); break;
case T_STRIPES: fimg_do_stripes(&fimg, fvalue, 0); break;
case T_STRIPES: fimg_do_stripes(&fimg, 0); break;
case -1: exit(1);
}