This commit is contained in:
tth
2021-03-28 19:33:02 +02:00
parent 6e410e5f50
commit f3c9d85c73
2 changed files with 4 additions and 3 deletions

View File

@@ -38,13 +38,13 @@ if ( (xpos < 0) || (xpos > pdst->width - psrc->width) ||
srcpos = 0;
szl = psrc->width * sizeof(float);
for (y=0; y<psrc->height; y++) {
dstpos = ((y +ypos) * pdst->width) + xpos;
dstpos = ((y + ypos) * pdst->width) + xpos;
// fprintf(stderr, " %7d %7d %7d\n", y, srcpos, dstpos);
memcpy(pdst->R + dstpos, psrc->R + srcpos, szl);
memcpy(pdst->G + dstpos, psrc->G + srcpos, szl);
memcpy(pdst->B + dstpos, psrc->B + srcpos, szl);
srcpos += psrc->height;
srcpos += psrc->width;
}
return 0;