MagickCore 7.1.0
Convert, Edit, Or Compose Bitmap Images
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
 

Macros

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

Typedefs

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

Functions

static CubeInfoGetCubeInfo (void)
 
static NodeInfoGetNodeInfo (CubeInfo *, const size_t)
 
static void DestroyColorCube (const Image *, NodeInfo *)
 
static size_t ColorToNodeId (const PixelInfo *pixel, size_t index)
 
static MagickBooleanType IsPixelInfoColorMatch (const PixelInfo *magick_restrict p, const PixelInfo *magick_restrict q)
 
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, const size_t max_colors, ExceptionInfo *exception)
 
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

◆ EvaluateImageTag

#define EvaluateImageTag   " Compute image colors... "

◆ HistogramImageTag

#define HistogramImageTag   "Histogram/Image"

◆ MaximumUniqueColors

#define MaximumUniqueColors   1024

◆ MaxTreeDepth

#define MaxTreeDepth   8

Definition at line 67 of file histogram.c.

◆ NodesInAList

#define NodesInAList   1536

Definition at line 68 of file histogram.c.

◆ UniqueColorsImageTag

#define UniqueColorsImageTag   "UniqueColors/Image"

Typedef Documentation

◆ CubeInfo

typedef struct _CubeInfo CubeInfo

◆ NodeInfo

typedef struct _NodeInfo NodeInfo

◆ Nodes

typedef struct _Nodes Nodes

Function Documentation

◆ CheckImageColors()

◆ ClassifyImageColors()

◆ ColorToNodeId()

static size_t ColorToNodeId ( const PixelInfo pixel,
size_t  index 
)
inlinestatic

◆ DefineImageHistogram()

static void DefineImageHistogram ( const Image image,
NodeInfo node_info,
PixelInfo **  histogram 
)
static

◆ DestroyColorCube()

static void DestroyColorCube ( const Image image,
NodeInfo node_info 
)
static

◆ DestroyCubeInfo()

static CubeInfo * DestroyCubeInfo ( const Image image,
CubeInfo cube_info 
)
static

◆ GetCubeInfo()

static CubeInfo * GetCubeInfo ( void  )
static

◆ GetImageHistogram()

◆ GetNodeInfo()

static NodeInfo * GetNodeInfo ( CubeInfo cube_info,
const size_t  level 
)
static

◆ GetNumberColors()

◆ HistogramCompare()

static int HistogramCompare ( const void *  x,
const void *  y 
)
static

Definition at line 1008 of file histogram.c.

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

Referenced by GetNumberColors().

◆ IdentifyPaletteImage()

◆ IsHistogramImage()

◆ IsPaletteImage()

◆ IsPixelInfoColorMatch()

static MagickBooleanType IsPixelInfoColorMatch ( const PixelInfo *magick_restrict  p,
const PixelInfo *magick_restrict  q 
)
inlinestatic

◆ MinMaxStretchImage()

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

◆ UniqueColorsToImage()

◆ UniqueImageColors()