minor tweaks
This commit is contained in:
parent
1ef877d947
commit
af103abdcf
@ -20,7 +20,7 @@
|
|||||||
* https://git.tetalab.org/tTh/FloatImg
|
* https://git.tetalab.org/tTh/FloatImg
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define FIMG_VERSION (210)
|
#define FIMG_VERSION (212)
|
||||||
#define RELEASE_NAME ("noname")
|
#define RELEASE_NAME ("noname")
|
||||||
|
|
||||||
/* XXX add a test for stdint.h / uint32_t XXX */
|
/* XXX add a test for stdint.h / uint32_t XXX */
|
||||||
|
@ -55,9 +55,9 @@ int xs, ys, loop9;
|
|||||||
int xp, yp;
|
int xp, yp;
|
||||||
float rgb[3];
|
float rgb[3];
|
||||||
|
|
||||||
// #if DEBUG_LEVEL
|
#if DEBUG_LEVEL
|
||||||
fprintf(stderr, ">>> %s ( %p %p %d )\n", __func__, sfimg, dfimg, index);
|
fprintf(stderr, ">>> %s ( %p %p %d )\n", __func__, sfimg, dfimg, index);
|
||||||
// #endif
|
#endif
|
||||||
|
|
||||||
if ( (index<0) || (index>8)) {
|
if ( (index<0) || (index>8)) {
|
||||||
fprintf(stderr, " %s: bad index %d\n", __func__, index);
|
fprintf(stderr, " %s: bad index %d\n", __func__, index);
|
||||||
@ -75,7 +75,7 @@ for (ys=1; ys<sfimg->height-1; ys++) {
|
|||||||
xp = xs + deltas[loop9].x;
|
xp = xs + deltas[loop9].x;
|
||||||
yp = ys + deltas[loop9].y;
|
yp = ys + deltas[loop9].y;
|
||||||
fimg_get_rgb(sfimg, xp, yp, rgb);
|
fimg_get_rgb(sfimg, xp, yp, rgb);
|
||||||
pixels[loop9].fgris = rgb[0];
|
pixels[loop9].fgris = rgb[0] + rgb[1] + rgb[2];
|
||||||
pixels[loop9].rang = loop9;
|
pixels[loop9].rang = loop9;
|
||||||
}
|
}
|
||||||
qsort(&pixels, 9, sizeof(fpixel), comparaison_fgris);
|
qsort(&pixels, 9, sizeof(fpixel), comparaison_fgris);
|
||||||
|
@ -22,8 +22,10 @@ static int check_boundaries(FloatImg *from, FloatImg *to, FimgArea51 *a51)
|
|||||||
fprintf(stderr, ">>> %s ( %p %p %p )\n", __func__, from, to, a51);
|
fprintf(stderr, ">>> %s ( %p %p %p )\n", __func__, from, to, a51);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
fimg_printdims("from", from);
|
if (verbosity > 1) {
|
||||||
fimg_printdims("to ", to);
|
fimg_printdims("from", from);
|
||||||
|
fimg_printdims("to ", to);
|
||||||
|
}
|
||||||
|
|
||||||
/* just a small molly-guard */
|
/* just a small molly-guard */
|
||||||
if ( (a51->w < 0) || (a51->h < 0) ) {
|
if ( (a51->w < 0) || (a51->h < 0) ) {
|
||||||
@ -81,7 +83,8 @@ if (foo) {
|
|||||||
|
|
||||||
if ( (xpos < 0) || (xpos > pdst->width - psrc->width) ||
|
if ( (xpos < 0) || (xpos > pdst->width - psrc->width) ||
|
||||||
(ypos < 0) || (ypos > pdst->height - psrc->height) ) {
|
(ypos < 0) || (ypos > pdst->height - psrc->height) ) {
|
||||||
fprintf(stderr, "%s: boudary error\n", __func__);
|
fprintf(stderr, "%s: boudary error, x=%d y=%d\n", __func__,
|
||||||
|
xpos, ypos);
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user