Method

GimpDrawablehistogram

Declaration [src]

gboolean
gimp_drawable_histogram (
  GimpDrawable* drawable,
  GimpHistogramChannel channel,
  gdouble start_range,
  gdouble end_range,
  gdouble* mean,
  gdouble* std_dev,
  gdouble* median,
  gdouble* pixels,
  gdouble* count,
  gdouble* percentile
)

Description [src]

Returns information on the intensity histogram for the specified drawable.

This tool makes it possible to gather information about the intensity histogram of a drawable. A channel to examine is first specified. This can be either value, red, green, or blue, depending on whether the drawable is of type color or grayscale. Second, a range of intensities are specified. The gimp_drawable_histogram() function returns statistics based on the pixels in the drawable that fall under this range of values. Mean, standard deviation, median, number of pixels, and percentile are all returned. Additionally, the total count of pixels in the image is returned. Counts of pixels are weighted by any associated alpha values and by the current selection mask. That is, pixels that lie outside an active selection mask will not be counted. Similarly, pixels with transparent alpha values will not be counted. The returned mean, std_dev and median are in the range (0..255) for 8-bit images or if the plug-in is not precision-aware, and in the range (0.0..1.0) otherwise.

Available since:2.10

Parameters

channel GimpHistogramChannel
 

The channel to query.

start_range gdouble
 

Start of the intensity measurement range.

end_range gdouble
 

End of the intensity measurement range.

mean gdouble*
 

Mean intensity value.

 The argument will be set by the function.
std_dev gdouble*
 

Standard deviation of intensity values.

 The argument will be set by the function.
median gdouble*
 

Median intensity value.

 The argument will be set by the function.
pixels gdouble*
 

Alpha-weighted pixel count for entire image.

 The argument will be set by the function.
count gdouble*
 

Alpha-weighted pixel count for range.

 The argument will be set by the function.
percentile gdouble*
 

Percentile that range falls under.

 The argument will be set by the function.

Return value

Returns: gboolean
 

TRUE on success.