MagickCore  7.0.10
histogram.c File Reference
Include dependency graph for histogram.c:

Go to the source code of this file.

Data Structures

struct  _NodeInfo
struct  _Nodes
struct  _CubeInfo


#define MaxTreeDepth   8
#define NodesInAList   1536
#define EvaluateImageTag   " Compute image colors... "
#define MaximumUniqueColors   1024
#define HistogramImageTag   "Histogram/Image"
#define UniqueColorsImageTag   "UniqueColors/Image"


typedef struct _NodeInfo NodeInfo
typedef struct _Nodes Nodes
typedef struct _CubeInfo CubeInfo


static CubeInfoGetCubeInfo (void)
static NodeInfoGetNodeInfo (CubeInfo *, const size_t)
static void DestroyColorCube (const Image *, NodeInfo *)
static size_t ColorToNodeId (const Image *image, const PixelInfo *pixel, size_t index)
static CubeInfoClassifyImageColors (const Image *image, ExceptionInfo *exception)
static void DefineImageHistogram (const Image *image, NodeInfo *node_info, PixelInfo **histogram)
static CubeInfoDestroyCubeInfo (const Image *image, CubeInfo *cube_info)
MagickExport PixelInfoGetImageHistogram (const Image *image, size_t *number_colors, ExceptionInfo *exception)
static MagickBooleanType CheckImageColors (const Image *image, ExceptionInfo *exception, size_t max_colors)
MagickExport MagickBooleanType IdentifyPaletteImage (const Image *image, ExceptionInfo *exception)
MagickExport MagickBooleanType IsHistogramImage (const Image *image, ExceptionInfo *exception)
MagickExport MagickBooleanType IsPaletteImage (const Image *image)
MagickExport MagickBooleanType MinMaxStretchImage (Image *image, const double black, const double white, const double gamma, ExceptionInfo *exception)
static int HistogramCompare (const void *x, const void *y)
MagickExport size_t GetNumberColors (const Image *image, FILE *file, ExceptionInfo *exception)
static void UniqueColorsToImage (Image *unique_image, CacheView *unique_view, CubeInfo *cube_info, const NodeInfo *node_info, ExceptionInfo *exception)
MagickExport ImageUniqueImageColors (const Image *image, ExceptionInfo *exception)

Macro Definition Documentation

#define EvaluateImageTag   " Compute image colors... "

Referenced by ClassifyImageColors().

#define HistogramImageTag   "Histogram/Image"

Referenced by GetNumberColors().

#define MaximumUniqueColors   1024

Referenced by IsHistogramImage().

#define MaxTreeDepth   8
#define NodesInAList   1536

Definition at line 68 of file histogram.c.

Referenced by GetNodeInfo().

#define UniqueColorsImageTag   "UniqueColors/Image"

Referenced by UniqueColorsToImage().

Typedef Documentation

typedef struct _CubeInfo CubeInfo
typedef struct _NodeInfo NodeInfo
typedef struct _Nodes Nodes

Function Documentation

static size_t ColorToNodeId ( const Image image,
const PixelInfo pixel,
size_t  index 
static void DefineImageHistogram ( const Image image,
NodeInfo node_info,
PixelInfo **  histogram 
static void DestroyColorCube ( const Image image,
NodeInfo node_info 
static CubeInfo* DestroyCubeInfo ( const Image image,
CubeInfo cube_info 
static CubeInfo * GetCubeInfo ( void  )

Definition at line 479 of file histogram.c.

References AcquireMagickMemory(), GetNodeInfo(), and _CubeInfo::root.

Referenced by CheckImageColors(), and ClassifyImageColors().

static NodeInfo * GetNodeInfo ( CubeInfo cube_info,
const size_t  level 
static int HistogramCompare ( const void *  x,
const void *  y 

Definition at line 981 of file histogram.c.

References _PixelInfo::blue, _PixelInfo::count, _PixelInfo::green, and _PixelInfo::red.

Referenced by GetNumberColors().

MagickExport MagickBooleanType MinMaxStretchImage ( Image image,
const double  black,
const double  white,
const double  gamma,
ExceptionInfo exception