Firefly - Photoshop icon

Firefly - Photoshop

Interact with Adobe Photoshop API for image manipulation

Refine Mask

AI-generated

Summary

Refine a mask on a source image by applying adjustable parameters such as contrast, feather, smoothness, edge shifting, and optional color decontamination; outputs the refined mask image according to specified storage configuration.

Inputs

  • Source Image (JSON) (required) — JSON configuration object specifying the storage location of the source image to which the mask applies.
  • Mask Image (JSON) (required) — JSON configuration object specifying the storage location of the original mask image to be refined.
  • Output Storage (JSON) (required) — JSON configuration object defining where and in what format to store the refined mask output image.
  • Refinement Options — Optional collection of parameters to customize mask refinement, including:
  • Contrast (-100 to 100): Adjusts the contrast of the mask.
  • Feather (0 to 250): Sets the feathering in pixels to soften mask edges.
  • Smoothness (0 to 100): Controls the smoothness of the mask edges.
  • Shift Edge (-100 to 100): Moves the mask edge inward or outward.
  • Decontaminate (boolean): Enables or disables color decontamination to remove color spill.
  • Decontamination Amount (0 to 100): Sets the strength of color decontamination.

Output shape

a single refined mask image saved to the specified output storage location

The output image format and storage are defined by the Output Storage JSON input parameter. The operation accepts the source image and mask image stored externally, referencing them via JSON objects describing their access. Refinement options are all optional; defaults will be used if omitted.

Discussion