enhanced mkfimg: do_stripe take a maxlevel parameter
This commit is contained in:
@@ -62,15 +62,18 @@ for (x=0; x<img->width; x++) {
|
||||
return 0;
|
||||
}
|
||||
/* --------------------------------------------------------------------- */
|
||||
/* nouveau 19 septembre 2022 */
|
||||
/* nouveau 19 septembre 2022
|
||||
*
|
||||
* 6 octobre 2023 : rajout du parametre 'fmax'
|
||||
*/
|
||||
|
||||
int fimg_do_stripes(FloatImg *img, int mode)
|
||||
int fimg_do_stripes(FloatImg *img, float fmax, int mode)
|
||||
{
|
||||
int x, y, quad;
|
||||
float *ligne;
|
||||
float fr, fg, fb;
|
||||
|
||||
fprintf(stderr, ">>> %s ( %p %d )\n", __func__, img, mode);
|
||||
fprintf(stderr, ">>> %s ( %p %f %d )\n", __func__, img, fmax, mode);
|
||||
|
||||
/*
|
||||
* allocate and fill a lookup table
|
||||
@@ -79,8 +82,10 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user