Skip to main content

Background Handling

The background handling feature can remove, replace and balance the background of a portrait.

Parameters

ParameterTypeDefaultDescription
ReplacePathString-Path to replacement background image
backgroundR0-255255Red component for background color replacement
backgroundG0-255255Green component for background color replacement
backgroundB0-255255Blue component for background color replacement
balanceH-1.0 to 1.00.0Hue balance adjustment for background
balanceS-1.0 to 1.00.0Saturation balance adjustment for background
balanceV-1.0 to 1.00.0Value balance adjustment for background

Usage Examples

Replace with image file:

ReplacePath="/path/to/background.jpg"

Set solid color background:

backgroundR=128
backgroundG=192
backgroundB=255

Adjust background color balance:

balanceH=0.1    # Slight hue shift
balanceS=-0.2 # Reduce saturation
balanceV=0.05 # Increase brightness

Notes

  • When ReplacePath is specified, the RGB color values are ignored
  • Balance adjustments are applied after background replacement or color setting
  • HSV balance values range from -1.0 (maximum decrease) to 1.0 (maximum increase)
  • Default RGB values (255, 255, 255) create a white background when no replacement path is provided