/** This demonstrates adding, multiplying, and otherwise modifying a color image using operations on each color channel. */ i1 = new image["file:trs80iiib.jpg"] i2 = new image["file:circleTransNormal.png"] c1 = i1.toColorChannels[] c2 = i2.toColorChannels[] c3 = new array for c = 0 to 2 c3.push[(c2@c).multiplyInPlace[c1@c]] // Push alpha channel unmodified //c3.push[c2@3] i3 = new image[toArray[first[c3,3]], true] //i3 = new image[c3, true] // Use alpha channel i3.show[] i3.write["imageMath.png"]