ruby-libgd

GD::Image#copy_resize

Copies and optionally resamples a region from another image.