OpenImageIO/oiio — pull request #502 by lgritz (2013-02-01 08:15:06+00:00)
Title: Implement oiiotool --fit

--fit is closely related to --resize, but it keeps the original aspect ratio of the source image and fits it into the requested resolution, centering it and padding with black along the dimension that is "too big."

Along the way, needed to implement ImageBufAlgo::paste to copy a selected region from one ImageBuf to another (handy in its own right).