OpenImageIO/oiio — pull request #932 by lgritz (2014-08-08 04:21:54+00:00)
Title: Rotate and warp

Been working on this on and off for a while, as I got time. Finally, I've added a high-quality filtered rotation of arbitrary angle and center. It's actually just a special case of warping by a 3x3 transformation matrix, so I've exposed that, too.

ImageBufAlgo exposes these programmatically as warp() and rotate().

oiiotool --warp and --rotate work from the command line.

There are some odds and ends in here for things I fixed or changed along the way, including string_view-izing the Filter classes, and fixes for dealing with negative origins with files that don't support it.

As an interesting bit cross-project fertilization, the way I compute filter sizes for arbitrarily transformed pixels is by using a very stripped down version of the Dual2 class from OSL, which makes propagating derivatives through mathematical expressions a snap. (It's a *very* stripped down version, just the bare minimum for this task.)