CalculationsOptions
An object literal can be constructed with the following properties
and passed to Document.calculations.
As a type, CalculationsOptions
can be used in Typescript development.
Copied to your clipboard1const options = {2 source1: {3 document: doc,4 layer: doc.layers[0],5 channel: CalculationsChannel.GRAY6 invert: true7 },8 source2: {9 document: doc,10 layer: CalculationsLayer.MERGED,11 channel: doc.channels[2]12 },13 blending: CalculationsBlendMode.DARKEN,14 opacity: 50,15 result: CalculationsResult.NEWCHANNEL16};17await require('photoshop').app.activeDocument.calculations(options);18
Name | Type | Default | Range | Min Version | Description |
---|---|---|---|---|---|
blending | MULTIPLY | - | 24.5 | The blend mode used to merge "Source 1" and "Source 2" together. "Source 1" will be rendered above "Source 2" | |
mask | - | - | 24.5 | The Mask reference to be used in the Calculations operation | |
opacity | number | 100 | 0..100 | 24.5 | The opacity used for "Source 1" when merged with "Source 2". |
result | - | - | 24.5 | Where to output the result of the Calculations operation | |
source1 | - | - | 24.5 | The "Source 1" reference to be used in the Calculations operation. "Source 1" will be rendered above "Source 2" | |
source2 | - | - | 24.5 | The "Source 2" reference to be used in the Calculations operation |