Name

Modulate( ) — adjust the brightness, saturation, and hue

Synopsis

$image->Modulate(brightness=>percentage,
                    saturation=>percentage,
                    hue=>percentage)

Modulate( ) lets you control the brightness, saturation, and hue of an image. Each parameter is in the form of a percentage of the current value for that parameter. For example, to decrease brightness by 10% and increase saturation by 50%, use:

$image->Modulate(brightness=>-10, saturation=>50);

Get Programming Web Graphics with Perl and GNU Softwar now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.