marging bug fixed in TV_pix_0 function

This commit is contained in:
tTh 2024-08-10 17:48:08 +02:00
parent cd5f42b76e
commit 4a3f107263

View File

@ -123,13 +123,13 @@ xmax = src->width - w; ymax = src->height - h;
ox = (src->width % w) / 2; ox = (src->width % w) / 2;
oy = (src->height % h) / 2; oy = (src->height % h) / 2;
#if DEBUG_LEVEL #if DEBUG_LEVEL
fprintf(stderr, "%s : offsets = %d %d\n", __func__, ox, oy); fprintf(stderr, "%s : offsets = %d & %d\n", __func__, ox, oy);
#endif #endif
Image_clear(dst, grey, grey, grey); Image_clear(dst, grey, grey, grey);
for (x=ox; x<xmax; x+=w) { for (x=ox; x<xmax-ox; x+=w) {
zone.x = x + (w/2); zone.x = x + (w/2);
for (y=oy; y<ymax; y+=h) { for (y=oy; y<ymax-oy; y+=h) {
zone.y = y + (h/2); zone.y = y + (h/2);
r = src->Rpix[y][x] & 0xfe; r = src->Rpix[y][x] & 0xfe;
g = src->Gpix[y][x] & 0xfe; g = src->Gpix[y][x] & 0xfe;