home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 April / pcpro0402.iso / essentials / graphics / Gimp / gimp-src-20001226.exe / src / gimp / app / gimphistogram.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-12-20  |  2.9 KB  |  71 lines

  1. /* The GIMP -- an image manipulation program
  2.  * Copyright (C) 1995 Spencer Kimball and Peter Mattis
  3.  *
  4.  * gimphistogram module Copyright (C) 1999 Jay Cox <jaycox@earthlink.net>
  5.  *
  6.  * This program is free software; you can redistribute it and/or modify
  7.  * it under the terms of the GNU General Public License as published by
  8.  * the Free Software Foundation; either version 2 of the License, or
  9.  * (at your option) any later version.
  10.  *
  11.  * This program is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with this program; if not, write to the Free Software
  18.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  19.  */
  20.  
  21. #ifndef __GIMP_HISTOGRAM_H__
  22. #define __GIMP_HISTOGRAM_H__
  23.  
  24. #include "pixel_region.h"
  25. #include "gimpdrawable.h"
  26.  
  27. typedef enum
  28. {
  29.   GIMP_HISTOGRAM_VALUE = 0,
  30.   GIMP_HISTOGRAM_RED   = 1,
  31.   GIMP_HISTOGRAM_GREEN = 2,
  32.   GIMP_HISTOGRAM_BLUE  = 3,
  33.   GIMP_HISTOGRAM_ALPHA = 4
  34. } GimpHistogramChannel;
  35.  
  36.  
  37. GimpHistogram * gimp_histogram_new             (void);
  38. void            gimp_histogram_free            (GimpHistogram        *histogram);
  39. void            gimp_histogram_calculate       (GimpHistogram        *historgam, 
  40.                         PixelRegion          *region,
  41.                         PixelRegion          *mask);
  42. void            gimp_histogram_calculate_drawable (GimpHistogram     *histogram, 
  43.                            GimpDrawable      *drawable);
  44. gdouble         gimp_histogram_get_maximum     (GimpHistogram        *histogram,
  45.                         GimpHistogramChannel  channel);
  46. gdouble         gimp_histogram_get_count       (GimpHistogram        *histogram,
  47.                         gint                  start,
  48.                         gint                  end);
  49. gdouble         gimp_histogram_get_mean        (GimpHistogram        *histogram,
  50.                         GimpHistogramChannel  channel,
  51.                         gint                  start,
  52.                         gint                  end);
  53. gint            gimp_histogram_get_median      (GimpHistogram        *histogram,
  54.                         GimpHistogramChannel  channel,
  55.                         gint                  start,
  56.                         gint                  end);
  57. gdouble         gimp_histogram_get_std_dev     (GimpHistogram        *histogram,
  58.                         GimpHistogramChannel  channel,
  59.                         gint                  start,
  60.                         gint                  end);
  61. gdouble         gimp_histogram_get_value       (GimpHistogram        *histogram,
  62.                         GimpHistogramChannel  channel,
  63.                         gint                  bin);
  64. gdouble         gimp_histogram_get_channel     (GimpHistogram        *histogram,
  65.                         GimpHistogramChannel  channel,
  66.                         gint                  bin);
  67. gint            gimp_histogram_nchannels       (GimpHistogram        *histogram);
  68.  
  69.  
  70. #endif /* __GIMP_HISTOGRAM_H__ */
  71.