Page 43
Quick Nav Bar
<<   Previous Contents
Selection
Op Index
Parent User Notes
Index
Glossary
Next   >>


Pixel (Color) Transfer Modes

Quick Reference to Scripting Command
a$=SETPTM("mode") [returns previous setting as STRING]

You may use the following strings for the names (upper and lower case do not matter, case is used simply for clarity here):

  • Matte
  • Additive
  • AddGray
  • AbsSubtract
  • SubGray
  • Subtract
  • Multiply
  • Divide
  • Dodge
  • Burn
  • Express
  • Exclude
  • HardLight
  • SoftLight
  • Overlay
  • Lighten
  • Darken
  • Hue
  • Saturation
  • Luma
  • Color
  • Clear
  • Behind
  • Dye
  • Dissolve
  • SoftDissolve
  • Mist
  • SoftMist
  • And
  • Or
  • Xor
  • Nand
  • Nor
  • Xnor

Items in CAPS are 0/1 switches or switches with more options than 0/1.

Transfer modes control how newly created pixel information is applied to the image or layer you are working with. The "normal" mode is Matte; this mode simply applies the generated color to the image. However, there are many other transfer modes that you may use, each with its own unique results. Each is detailed in the following section.

Note:

Keep this in mind...
These transfer modes generally work independently on each of the red, green and blue channels in an image or layer. For this reason, they are often explained in terms of channels below. However, because all three channels are processed for each pixel, each transfer mode is effectively a 24 bit mode.


These two images were used to demonstrate the various pixel transfer modes, by using collage/place to transfer the green blob to Stacey's picture. We put the merge in the same place in most images, unless moving it demonstrated something in particular.


Matte PTM

This applies the color normally, that is, as you would expect color to be applied. This is the default pixel transfer mode when WinImages F/x is started.

Additive PTM

This adds the color to the image or layer, increasing the brightness according to the color being applied. Since image channels can only reach 255, when an attempt is made to add value to a channel that has already reached 255, no change results.

Add Gray PTM

This adds the color to the image or layer, increasing the brightness according to the color being applied, but considering the color as a signed value where 128 in a channel is 0, less than 128 in a channel is negative, and greater than 128 is positive. Channels that are 128 will have no effect, less than 128 will darken, greater than 128 will lighten. Since image channels can only reach 255, when an attempt is made to add value to a channel that has already reached 255, no change results, and if a negative amount (less than 128) is added to a channel that has already reached 0, no change results.

Absolute Subtract PTM

This subtracts the color from the image or layer, decreasing the brightness according to the color being applied. Since image channels can only reach 0, when an attempt is made to subtract value from a channel that has already reached 0, no change results.

Sub Gray PTM

This subtracts the color to the image or layer, decreasing the brightness according to the color being applied, but considering the color as a signed value where 128 in a channel is 0, less than 128 in a channel is negative, and greater than 128 is positive. Channels that are 128 will have no effect, less than 128 will lighten, greater than 128 will darken. Since image channels can only reach 255, when an attempt is made to subtract value from a channel that has already reached 0, no change results, and if a negative amount (less than 128) is subtracted from a channel that has already reached 255, no change results.

Subtract PTM

This subtracts the color from the image or layer, decreasing the brightness according to the color being applied. Since image channels can only reach 0, when an attempt is made to subtract value from a channel that has already reached 0, the channel "wraps", that is, begins again at a high value. For instance, subtracting 3 from 1 will result in a channel value of 253.

Multiply PTM

This mode treats the original image channel and the applied channel as fractions from 0 to 1, with 0 being off and 1 being full intensity. The applied color channels multiply the existing channels in this form. Because of this, if the applied color is white (1 in all three channels) no change results - anything multiplied by one, is one. Anything multiplied by black is black - anything multiplied by zero, is zero. Levels in between black and white in any channel will result in a reduction of the channel value, as anything multiplied by a number less than one but greater than zero will be made smaller.

Divide PTM

This mode treats the original image channel and the applied channel as fractions from 0 to 1, with 0 being off and 1 being full intensity. The applied color channels divide the existing channels in this form. Channel division results in an increase in brightness.

Dodge PTM

Dodge increases brightness.

Burn PTM

Burn decreases brightness.

Express PTM

Express increases brightness; it is a more gentle form of burn.

Exclude PTM

Exclude is a more gentle form of absolute subtraction.

Hard Light PTM

Applies the color hard.

Soft Light PTM

Applies the color softly.

Overlay PTM

Generally increases brightness.

Lighten PTM

Increases brightness.

Darken PTM

Decreases brightness.

Hue PTM

Applies the hue of the new color to the layer or image. The original saturation and luma are left intact.

Saturation PTM

Applies the saturation of the new color to the layer or image. The original hue and luma are left intact.

Luma PTM

Applies the luma of the new color to the layer or image. The original saturation and hue are left intact.

Color PTM

Applies the hue and saturation of the new color to the layer or image. The original luma is left intact.

Clear PTM

Creates transparency (in layers, and images with alpha channels)

Behind PTM

Very much like the Matte mode, however color is only transferred to the layer or image when the image is completely or partially transparent in the target location. This essentially "protects" already existing color. You can think of it as a quick way to draw behind something in an image with an alpha channel without having to resort to a layer beneath it. However... layers are considerably more flexible, and you would usually want to use a layer!

To demonstrate this, we used the cleared image (from the clear mode, above) and placed the blob image centered just to the left of Stacey's lips. The blob would have overwritten the exposed portion of her face, but behind mode protects existing pixel data.

Dye PTM

This applies the hue and saturation of the applied color to the image or layer. It is considerably more intense than the hue mode.

Dissolve PTM

Similar to matte mode, but with one important difference. Normally, when color is transferred to an image or layer, the transparency of the area selection mask causes color to be mixed linearly with the color in the image or layer. Dissolve changes the idea of mixing color to the idea of the probability of the color being applied decreasing, leading to a "sprayed-on" effect. Dissolve will be effective with transfer of image data that contains transparency, for instance merging an image with soft edges.

Soft Dissolve PTM

Similar to dissolve mode, but with one difference. Soft dissolve also uses the area selection mask to change the mix of pixels in areas where the area selection is not fully opaque. A gentler version of the dissolve effect.

Mist PTM

Similar to dissolve mode, but uses the area selection mask to change the probability of pixels instead of the transparency of the applied color. This is more effective for feathered selections, so you can use it with color fill, which doesn't have in-built transparency - it gets any transparency from the area selection mask.

The image is the same as that for dissolve, however you would get this result not from collage/place, but from a feathered elliptical area color fill directly on the image.

Soft Mist PTM

Similar to mist mode, but uses the area selection mask to change the probability of pixels with the transparency of the applied color. This is more effective for feathered selections of partially transparent image data, similar to soft dissolve.

The image is the same as that for soft dissolve, however you would get this result not from collage/place, but from a feathered elliptical area color fill directly on the image.

AND PTM

This is a logical (bitwise) transfer mode. For each bit in an image or layer pixel channel and each corresponding bit in the applied color channels, the following on or off rules apply:

OrigNewResult
000
010
100
111

RULE: "When the original bit AND the new bit are both on, the result bit is on."

OR PTM

This is a logical (bitwise) transfer mode. For each bit in an image or layer pixel channel and each corresponding bit in the applied color channels, the following on or off rules apply:

OrigNewResult
000
011
101
111

RULE: "When the original bit OR the new bit is on, the result bit is on."

XOR PTM

This is a logical (bitwise) transfer mode. For each bit in an image or layer pixel channel and each corresponding bit in the applied color channels, the following on or off rules apply:

OrigNewResult
000
011
101
110

RULE: "When the original and the new bits are DIFFERENT, the result bit is on."

NAND (NOT AND) PTM

This is a logical (bitwise) transfer mode. For each bit in an image or layer pixel channel and each corresponding bit in the applied color channels, the following on or off rules apply:

OrigNewResult
001
011
101
110

RULE: "When the original bit AND the new bit are both on, the result bit is NOT on."

NOR (NOT OR) PTM

This is a logical (bitwise) transfer mode. For each bit in an image or layer pixel channel and each corresponding bit in the applied color channels, the following on or off rules apply:

OrigNewResult
001
010
100
110

RULE: "When the original bit OR the new bit is on, the result bit is NOT on."

XNOR (NOT XOR) PTM

This is a logical (bitwise) transfer mode. For each bit in an image or layer pixel channel and each corresponding bit in the applied color channels, the following on or off rules apply:

OrigNewResult
001
010
100
111

RULE: "When the original and the new bits are DIFFERENT, the result bit is NOT on."



Quick Nav Bar
<<   Previous Contents
Selection
Op Index
Parent User Notes
Index
Glossary
Next   >>
Page 43

WinImages F/x, WinImages Morph and all associated documentation
Copyright © 1992-2007 Black Belt Systems ALL RIGHTS RESERVED Under the Pan-American Conventions

WinImages F/x Manual Version 7, Revision 5, Level B

HTML Documentation Management System © 1992-2007 Black Belt Systems