flip_transverse_rgba Tcl_Obj* imageObj crimp_image* image; crimp_image* result; int x, y; crimp_input (imageObj, image, rgba); result = crimp_new_like_transpose (image); for (y = 0; y < image->w; y++) { for (x = 0; x < image->h; x++) { R (result, x, y) = R (image, image->w - y - 1, image->h - x - 1); G (result, x, y) = G (image, image->w - y - 1, image->h - x - 1); B (result, x, y) = B (image, image->w - y - 1, image->h - x - 1); A (result, x, y) = A (image, image->w - y - 1, image->h - x - 1); } } Tcl_SetObjResult(interp, crimp_new_image_obj (result)); return TCL_OK; /* vim: set sts=4 sw=4 tw=80 et ft=c: */ /* * Local Variables: * mode: c * c-basic-offset: 4 * fill-column: 78 * End: */