GraphicsMagick

- Home
- Project
- Download
- Install
- Source
- News
- Utilities
- Programming
- Reference

# statistics

Compute image statistics

Contents

- GetImageStatistics

# GetImageStatistics

## Synopsis

    MagickPassFail GetImageStatistics( const Image *image, ImageStatistics *statistics,
                                       ExceptionInfo *exception );

## Description

GetImageStatistics computes common statistics (currently maximum, minimum, mean and standard deviation) for the available image channels. The per-channel values are returned in an ImageStatistics structure. Statistics are normalized to the range 0.0 to 1.0. Multiply values by MaxRGB to obtain the statistics in quantum units. Statistics for non-existent channels are set to zero.

The format of the GetImageStatistics method is:

    MagickPassFail GetImageStatistics( const Image *image, ImageStatistics *statistics,
                                       ExceptionInfo *exception );

image:

  The image.

statistics:

  An ImageStatistics structure to update with statistics.

exception:

  Any errors are reported here.

Copyright © GraphicsMagick Group 2002 - 2024