IceMan Reference Guide |
The basic image merging operations defined by Porter and Duff in their 1984 paper, with a couple of additions. All these operations are methods of Image and return a new Image instance.
Each of the following operations is illustrated with these foreground and background images:
teapot.tif |
Alpha channel of "teapot.tif" |
tinbox.tif |
Alpha channel of "tinbox.tif" |
The image being operated on is the background image.
|
fg := IceImage With("teapot.tif")
bg := IceImage With("tinbox.tif")
result := bg Over(fg)
|
Correlated Over operation. Similar to Over, but works better for correlated subpixel coverage.
|
fg := IceImage With("teapot.tif")
bg := IceImage With("tinbox.tif")
result := bg Cover(fg)
|
Merge "atop".
|
fg := IceImage With("teapot.tif")
bg := IceImage With("tinbox.tif")
result := bg Atop(fg)
|
Merge "in".
|
fg := IceImage with('teapot.tif')
bg := IceImage with('tinbox.tif')
result := bg In(fg)
|
Merge XOR operation.
|
fg := IceImage With("teapot.tif")
bg := IceImage With("tinbox.tif")
result := bg MergeXor(fg)
|
Merge out operation.
|
fg := IceImage With("teapot.tif")
bg := IceImage With("tinbox.tif")
result := bg Out(fg)
|
In this operation, the foreground acts as a color filter for the background.
|
fg := IceImage With("teapot.tif")
bg := IceImage With("tinbox.tif")
result := bg TransmissionFilter(fg)
|
|
Pixar Animation Studios
|