A SERVICE OF

logo

MediaScript Objects and Methods 49
adjustHsb()
Alters the HSB levels of an image. It can be applied to images of all supported bit-depths.
NOTE: This function is “selection aware,” so that if a selection has been made, the system applies
it based on the current selection. For more information about making selections, see selection().
Syntax
adjustHsb(
[Hue @ <value ±255>]
[Saturation @ <value ±255>]
[Brightness @ <value ±255>]
[UseHLS @ <value true,false>]
);
Parameters
The default value for any parameter not specified is zero.
Hue - an angular color value, so the results from hue @ -255 and hue @ 255 are almost
identical.
Saturation and Brightness - linear color values that set the base level for the
saturation and brightness of the image.
UseHLS - if specified as “true”, causes the adjustment to be performed in the HLS
colorspace. In this case, the Saturation parameter is interpreted as lightness and the
Brightness parameter is interpreted as Saturation.
Example
var image = new Media();
image.load(name @ "car.tga");
image.adjustHsb(hue @ 120, saturation @ 50, brightness @ 110);
image.save(type @ "jpeg");
addArgument()
Adds the specified name-value pair to the next Media object method call.