Simple transform2() images

transform2() is intended as a patch for the Imager module by Addi.

It extends the capabilities provided by the current transform() function by adding the ability to transform the colours of images and to take more than one image (or even zero images) as input. transform2() also seems to be faster than transform() (it's now only a little faster than transform() for the benchmark I'm using - I added some exception prevention code which may be slowing it down.)

I've created a web page demo.

I still need to do the following work on transform2():

Possible enhancements (from some other time):

Resolved: I've put up the current documentation for Imager, Imager::Expr and Imager::regmach.pod. The version of pod2html that I'm using seems to be broken when converting &, so you may see some strange constructions ;)

ImageExpression
Base image
x 25 % 15 * y 35 % 10 * getp1 !pat x y getp1 !pix @pix sat 0.7 gt @pat @pix ifp
x 25 % 15 * y 35 % 10 * getp1 !pat y 360 / !rat x y getp1 1 @rat - pmult @pat @rat pmult padd
x y getp1 !pix @pix value 0.96 gt @pix sat 0.1 lt and 128 128 255 rgb @pix ifp
x 35 % 10 * y 45 % 8 * getp1 !pat x y getp1 !pix @pix sat 0.2 lt @pix value 0.9 gt and @pix @pat @pix value 2 / 0.5 + pmult ifp
x y 160 180 distance !d y 180 - x 160 - atan2 !a @d 10 / @a + 3.1416 2 * % !a2 @a2 180 * 3.1416 / 1 @a2 sin 1 + 2 / hsv
x y 160 180 distance !d y 180 - x 160 - atan2 !a @d 10 / @a + 3.1416 2 * % !a2 @a 180 * 3.1416 / 1 @a2 sin 1 + 2 / hsv