Processing
Options
Usage
MagickWand
MagickCore
PerlMagick
Magick++
Unix
Windows
Unix
Mac OS X
Windows
Links

## MinMaxStretchImage

MinMaxStretchImage() uses the exact minimum and maximum values found in each of the channels given, as the BlackPoint and WhitePoint to linearly stretch the colors (and histogram) of the image. The stretch points are also moved further inward by the adjustment values given.

If the adjustment values are both zero this function is equivelent to a perfect normalization (or autolevel) of the image.

Each channel is stretched independantally of each other (producing color distortion) unless the special 'SyncChannels' flag is also provided in the channels setting. If this flag is present the minimum and maximum point will be extracted from all the given channels, and those channels will be stretched by exactly the same amount (preventing color distortion).

The 'SyncChannels' is turned on in the 'DefaultChannels' setting by default.

The format of the MinMaxStretchImage method is:

      MagickBooleanType MinMaxStretchImage(Image *image,
        const ChannelType channel, const double black_adjust,
        const double white_adjust)

A description of each parameter follows:

##### image

The image to auto-level

##### channel

The channels to auto-level. If the special 'SyncChannels' flag is set, all the given channels are stretched by the same amount.

##### black_adjust, white_adjust

Move the Black/White Point inward from the minimum and maximum points by this color value.

Discourse Server • Mailing Lists • Studio