|
|
|
@ -31,7 +31,9 @@ if (src->type != FIMG_TYPE_RGB) {
|
|
|
|
|
|
|
|
|
|
/* check if dst pic is not allocated */
|
|
|
|
|
if ( 0 == (dst->type | dst->width | dst->height) ) {
|
|
|
|
|
#if DEBUG_LEVEL
|
|
|
|
|
fprintf(stderr, "in %s, %p is empty\n", __func__, dst);
|
|
|
|
|
#endif
|
|
|
|
|
/* OK allocate a new fpic */
|
|
|
|
|
foo = fimg_create(dst, src->height, src->width, src->type);
|
|
|
|
|
if (foo) {
|
|
|
|
@ -54,7 +56,7 @@ if ( (src->type != dst->type) ||
|
|
|
|
|
for (y=0; y<src->height; y++) {
|
|
|
|
|
for (x=0; x<src->width; x++) {
|
|
|
|
|
fimg_get_rgb(src, x, y, rgb);
|
|
|
|
|
fimg_plot_rgb(dst, y, x, rgb[0], rgb[1], rgb[2]);
|
|
|
|
|
fimg_put_rgb(dst, y, x, rgb);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|