#include #include #include #include #include /* -------------------------------------------------------- */ /* -------------------------------------------------------- */ int rgb_process_by_filename(char *inf, char *outf) { Image_Desc *src, *dst; int foo; int x, y, larg, offs; int r, g, b; if ( (src=Image_TGA_alloc_load(inf)) == NULL ) { fprintf(stderr, "%s: err load %s\n", __func__, inf); exit(5); } printf("source '%s' %dx%d\n", inf, src->width, src->height); if ( (dst=Image_clone(src, 0)) == NULL ) { fprintf(stderr, "%s: no mem for image cloning\n", __func__); exit(5); } Image_clear(dst, 160, 60, 60); /* * calcul de la zone à traiter */ larg = src->width / 3; offs = (src->width - larg) / 2; printf("largeur %d offset %d\n", larg, offs); for (y=0; yheight; y++) { for (x=0; x %d\n", foo); } return 0; } /* -------------------------------------------------------- */