Browse Source

oups...

master
tth 1 year ago
parent
commit
f3c9d85c73
  1. 3
      experiment/assemblage.c
  2. 4
      experiment/incrustator.c

3
experiment/assemblage.c

@ -29,7 +29,8 @@ if (foo) { @@ -29,7 +29,8 @@ if (foo) {
fprintf(stderr, "%s: Kkrkr %d pour create incrust\n", __func__, foo);
return -1;
}
fimg_drand48(&incrust, 13.37);
// fimg_drand48(&incrust, 13.37);
foo = fimg_load_from_dump("foo.fimg", &incrust);
foo = incrustator_0(&incrust, &grande, 100, 100, 0);
if (foo) {

4
experiment/incrustator.c

@ -38,13 +38,13 @@ if ( (xpos < 0) || (xpos > pdst->width - psrc->width) || @@ -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;

Loading…
Cancel
Save