- unsigned char *sptr = src_img + (src_rect.y * src_rect.width + src_rect.x) * 4;
- unsigned char *dptr = dest_img + (dest_y * dest_rect.width + dest_x) * 4;
-
- for(int i=0; i<height; i++) {
- memcpy(dptr, sptr, width * 4);
- sptr += src_rect.width * 4;
- dptr += dest_rect.width * 4;
- }