Sets the layer kind (such as 'text layer') for an empty layer. Valid only when the layer is empty and when 'is background layer ' is false. You can use the 'kind ' property to make a background layer a normal layer; however, to make a layer a background layer, you must set 'is background layer' to true.
brightnessIntThe brightness amount. Range: -100 to 100.
contrastIntThe contrast amount. Range: -100 to 100.
→ void
Adjusts the color balance of the layer's component channels.
shadows?Int[]The adjustments for the shadows. The array must include three values (in the range -100 to 100), which represent cyan or red, magenta or green, and yellow or blue, when the document mode is CMYK or RGB.
midtones?Int[]The adjustments for the midtones. The array must include three values (in the range -100 to 100), which represent cyan or red, magenta or green, and yellow or blue, when the document mode is CMYK or RGB.
highlights?Int[]The adjustments for the highlights. The array must include three values (in the range -100 to 100), which represent cyan or red, magenta or green, and yellow or blue, when the document mode is CMYK or RGB.
preserveLuminosity?BooleanIf true, luminosity is preserved.
→ void
Adjusts the tonal range of the selected channel using up to fourteen points.
curveShapePoint[]The curve points. The number of points must be between 2 and 14.
→ void
Adjusts levels of the selected channels.
inputRangeStartInt 0–253The input levels minimum. Range: 0 to 253.
inputRangeEndIntThe input levels maximum. Range: (input range start + 2) to 253.
inputRangeGammaNumberThe input levels gamma. Range: 0.10 to 9.99.
outputRangeStartInt 0–253The output levels minimum. Range: 0 to 253.
outputRangeEndIntThe output levels maximum. Range: (output range start + 2) to 253.
→ void
Applies the add noise filter.
amountNumberThe amount of noise (as a percentage). Range: 0.1 to 400.0.
monochromaticBooleanIf true, applies the filter only to the tonal elements in the image without changing the colors.
→ void
Applies the average filter.
→ void
Applies the blur filter.
→ void
Applies the blur more filter.
→ void
Applies the clouds filter.
→ void
Applies the custom filter.
characteristicsInt[]The custom filter characteristics. This is an array of 25 values that corresponds to a left-to-right, top-to- bottom traversal of the array presented in the Custom dialog in the user interface (Filter > Other > Custom).
scaleIntThe value by which to divide the sum of the brightness values of the pixels included in the calculation.
offsetIntThe value to be added to the result of the scale calculation.
curveVaries[]Specification of the shear curve in points as x,y coordinate pairs in the format [[x1, y1],[x2, y2]]. Any number of coordinate pairs can be specified.
undefinedAreasUndefinedAreasThe treatment of areas left blank by the distortion.
Adjusts the contrast of the selected channels automatically.
→ void
Adjust the levels of the selected channels using the auto levels option.
→ void
Cuts the layer without moving it to the clipboard.
→ void
Copies the layer to the clipboard.
merge?BooleanIf true, the copy includes all visible layers. If false, the copy only copies from the current layer.
→ void
Cuts the layer to the clipboard.
→ void
Converts a color image to a grayscale image in the current color mode by assigning equal values of each component color to each pixel.
→ void
Redistributes the brightness values of pixels in an image to more evenly represent the entire range of brightness levels within the image.
→ void
Inverts the colors in the layer by converting the brightness value of each pixel in the channels to the inverse value on the 256-step color-values scale.
Merges the layer down, removing the layer from the document. Returns a reference to the art layer that this layer is merged into.
→ void
Modifies a targeted (output) color channel using a mix of the existing color channels in the image. (output channels = An array of channel specifications. For each component channel, specify a list of adjustment values (-200 to 200) followed by a 'constant' value (-200 to 200).) When monochrome = true, the maximum number of channel value specifications is 1. Valid only when 'document mode' = RGB or CMYK. RGB arrays must include four doubles. CMYK arrays must include five doubles.
outputChannelsVaries[]A list of channel specifications. For each component channel that the document has, you must specify a list of adjustment values followed by a 'constant' value.
monochrome?BooleanIf true, uses monochrome mixing. Note: If this is true, you can only specify one channel value.
→ void
Adjusts the layer's color balance and temperature as if a color filter had been applied.
fillColor?SolidColorThe color to use for the fill.
density?Int 1–100The density (as a percentage) of the filter effect. Range: 1 to 100.
preserveLuminosity?BooleanIf true, luminosity is preserved.
→ void
Specifies the number of tonal levels for each channel and then maps pixels to the closest matching level.
levelsInt 2–255The tonal levels. Range: 2 to 255.
→ void
Converts the targeted content in the layer into a flat, raster image.
selectionMethodAdjustmentReferenceModifies the amount of a process color in a specified primary color without affecting the other primary colors.
reds?Number[]Array of 4 values: cyan, magenta, yellow, black.
yellows?Number[]Array of 4 values: cyan, magenta, yellow, black.
greens?Number[]Array of 4 values: cyan, magenta, yellow, black.
cyans?Number[]Array of 4 values: cyan, magenta, yellow, black.
blues?Number[]Array of 4 values: cyan, magenta, yellow, black.
magentas?Number[]Array of 4 values: cyan, magenta, yellow, black.
whites?Number[]Array of 4 values: cyan, magenta, yellow, black.
neutrals?Number[]Array of 4 values: cyan, magenta, yellow, black.
blacks?Number[]Array of 4 values: cyan, magenta, yellow, black.
→ void
Adjusts the range of tones in the shadows and highlights.
shadowAmount?Int 0–100The shadow amount, as a percentage. Range: 0 to 100.
shadowWidth?Int 0–100The shadow width, as a percentage. Range: 0 to 100 for tonal width (0 = narrow), (100 = broad).
shadowRaduis?Int 0–2500The shadow radius (in pixels). Range: 0 to 2500.
highlightAmount?Int 0–100The highlight amount, as a percentage. Range: 0 to 100.
highlightWidth?Int 0–100The highlight width. Range: 0 to 100 for tonal width (0 = narrow), (100 = broad).
highlightRaduis?Int 0–2500The highlight radius (in pixels). Range: 0 to 2500.
colorCorrection?IntThe amount to adjust the colors in the changed portion of the image. Range: -100 to 100.
midtoneContrast?IntThe amount of midtone contrast. Range: -100 to 100.
blackClip?NumberFractions of whites to be clipped. Range: 0.000 to 50.000.
whiteClip?NumberFractions of blacks to be clipped. Range: 0.000 to 50.000.
→ void
Converts grayscale or color images to high-contrast, B/W images by converting pixels lighter than the specified threshold to white and pixels darker than the threshold to black.