2020-10-30 23:14:23 +11:00
|
|
|
/*
|
|
|
|
* FloatImg : some dithering experiments
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
2021-05-20 18:31:28 +11:00
|
|
|
#include <stdint.h>
|
2020-10-30 23:14:23 +11:00
|
|
|
#include <string.h>
|
|
|
|
#include <math.h>
|
|
|
|
|
|
|
|
#include "../floatimg.h"
|
|
|
|
|
|
|
|
extern int verbosity;
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------- */
|
|
|
|
int fimg_dither_0(FloatImg *psrc, FloatImg *pdst, int flags)
|
|
|
|
{
|
|
|
|
int x, y;
|
|
|
|
|
2022-07-06 19:27:55 +11:00
|
|
|
#if DEBUG_LEVEL
|
|
|
|
fprintf(stderr, ">>> %s ( %p %p 0x%04x )\n", __func__, psrc, pdst, flags);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
if (flags) { fprintf(stderr, "flags: 0x%04x in %s\n", flags, __func__); }
|
|
|
|
|
2023-10-08 16:28:57 +11:00
|
|
|
if (fimg_images_not_compatible(psrc, pdst)) {
|
|
|
|
fprintf(stderr, "%s: shit happen\n", __func__);
|
|
|
|
return -2;
|
|
|
|
}
|
|
|
|
|
2020-10-30 23:14:23 +11:00
|
|
|
for (y=0; y<psrc->height; y++) {
|
|
|
|
|
|
|
|
for (x=0; x<psrc->width; x++)
|
|
|
|
{
|
|
|
|
|
2021-05-20 18:31:28 +11:00
|
|
|
/* PLEASE DO SOMETHING HERE */
|
2020-10-30 23:14:23 +11:00
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
/* --------------------------------------------------------------------- */
|
|
|
|
|