OpenImageIO/oiio — pull request #705 by lgritz (2013-10-19 19:53:36+00:00)
Title: ImageBufAlgo refactor -- deprecate in-place operations

The vast majority of IBA functions take a dst and one or more source images, and operate by copying data from the source(s) to the destination while doing some computations on the values. A small minority instead operated "in-place". For the sake of uniformity, I have decided to deprecate the in-place operations in lieu of always taking a destination argument (in many functions, however, it's perfectly legal for dst to refer to the same image as src, and the docs point this out).

To serve this end, this patch does the following:

* Deprecate the in-place varieties of IBA add, sub, mul, rangecompress, rangeexpand, unpremult, premult, clamp, fixNonFinite. Add new "copying" varieties (which can be made to operate in-place merely by specifying the same image for src and dst).

* Add sub() varieties that take float or float* operand (did not exist before).

* Remove other IBA functions that were deprecated in 1.2 (and adjust a few places where we still used the deprecated versions).

* Add testsuite tests for oiiotool --rangecompress and --rangeexpand.