MagickCore 7.1.0
Convert, Edit, Or Compose Bitmap Images
|
#include "MagickCore/studio.h"
#include "MagickCore/color-private.h"
#include "MagickCore/draw.h"
#include "MagickCore/gem.h"
#include "MagickCore/gem-private.h"
#include "MagickCore/image.h"
#include "MagickCore/image-private.h"
#include "MagickCore/log.h"
#include "MagickCore/memory_.h"
#include "MagickCore/pixel-accessor.h"
#include "MagickCore/quantum.h"
#include "MagickCore/quantum-private.h"
#include "MagickCore/random_.h"
#include "MagickCore/resize.h"
#include "MagickCore/transform.h"
#include "MagickCore/signature-private.h"
Go to the source code of this file.
Macros | |
#define | SigmaUniform (attenuate*0.015625) |
#define | SigmaGaussian (attenuate*0.015625) |
#define | SigmaImpulse (attenuate*0.1) |
#define | SigmaLaplacian (attenuate*0.0390625) |
#define | SigmaMultiplicativeGaussian (attenuate*0.5) |
#define | SigmaPoisson (attenuate*12.5) |
#define | SigmaRandom (attenuate) |
#define | TauGaussian (attenuate*0.078125) |
Functions | |
MagickPrivate void | ConvertHCLToRGB (const double hue, const double chroma, const double luma, double *red, double *green, double *blue) |
MagickPrivate void | ConvertHCLpToRGB (const double hue, const double chroma, const double luma, double *red, double *green, double *blue) |
MagickPrivate void | ConvertHSBToRGB (const double hue, const double saturation, const double brightness, double *red, double *green, double *blue) |
MagickPrivate void | ConvertHSIToRGB (const double hue, const double saturation, const double intensity, double *red, double *green, double *blue) |
MagickExport void | ConvertHSLToRGB (const double hue, const double saturation, const double lightness, double *red, double *green, double *blue) |
MagickPrivate void | ConvertHSVToRGB (const double hue, const double saturation, const double value, double *red, double *green, double *blue) |
MagickPrivate void | ConvertHWBToRGB (const double hue, const double whiteness, const double blackness, double *red, double *green, double *blue) |
static void | ConvertLCHabToXYZ (const double luma, const double chroma, const double hue, const IlluminantType illuminant, double *X, double *Y, double *Z) |
MagickPrivate void | ConvertLCHabToRGB (const double luma, const double chroma, const double hue, const IlluminantType illuminant, double *red, double *green, double *blue) |
static void | ConvertLCHuvToXYZ (const double luma, const double chroma, const double hue, const IlluminantType illuminant, double *X, double *Y, double *Z) |
MagickPrivate void | ConvertLCHuvToRGB (const double luma, const double chroma, const double hue, const IlluminantType illuminant, double *red, double *green, double *blue) |
MagickPrivate void | ConvertRGBToHCL (const double red, const double green, const double blue, double *hue, double *chroma, double *luma) |
MagickPrivate void | ConvertRGBToHCLp (const double red, const double green, const double blue, double *hue, double *chroma, double *luma) |
MagickPrivate void | ConvertRGBToHSB (const double red, const double green, const double blue, double *hue, double *saturation, double *brightness) |
MagickPrivate void | ConvertRGBToHSI (const double red, const double green, const double blue, double *hue, double *saturation, double *intensity) |
MagickExport void | ConvertRGBToHSL (const double red, const double green, const double blue, double *hue, double *saturation, double *lightness) |
MagickPrivate void | ConvertRGBToHSV (const double red, const double green, const double blue, double *hue, double *saturation, double *value) |
MagickPrivate void | ConvertRGBToHWB (const double red, const double green, const double blue, double *hue, double *whiteness, double *blackness) |
MagickPrivate void | ConvertRGBToLab (const double red, const double green, const double blue, const IlluminantType illuminant, double *L, double *a, double *b) |
static void | ConvertXYZToLCHab (const double X, const double Y, const double Z, const IlluminantType illuminant, double *luma, double *chroma, double *hue) |
MagickPrivate void | ConvertRGBToLCHab (const double red, const double green, const double blue, const IlluminantType illuminant, double *luma, double *chroma, double *hue) |
static void | ConvertXYZToLCHuv (const double X, const double Y, const double Z, const IlluminantType illuminant, double *luma, double *chroma, double *hue) |
MagickPrivate void | ConvertRGBToLCHuv (const double red, const double green, const double blue, const IlluminantType illuminant, double *luma, double *chroma, double *hue) |
MagickExport double | ExpandAffine (const AffineMatrix *affine) |
MagickPrivate double | GenerateDifferentialNoise (RandomInfo *random_info, const Quantum pixel, const NoiseType noise_type, const double attenuate) |
MagickPrivate size_t | GetOptimalKernelWidth1D (const double radius, const double sigma) |
MagickPrivate size_t | GetOptimalKernelWidth2D (const double radius, const double sigma) |
MagickPrivate size_t | GetOptimalKernelWidth (const double radius, const double sigma) |
#define SigmaGaussian (attenuate*0.015625) |
#define SigmaImpulse (attenuate*0.1) |
#define SigmaLaplacian (attenuate*0.0390625) |
#define SigmaMultiplicativeGaussian (attenuate*0.5) |
#define SigmaPoisson (attenuate*12.5) |
#define SigmaRandom (attenuate) |
#define SigmaUniform (attenuate*0.015625) |
#define TauGaussian (attenuate*0.078125) |
MagickPrivate void ConvertHCLpToRGB | ( | const double | hue, |
const double | chroma, | ||
const double | luma, | ||
double * | red, | ||
double * | green, | ||
double * | blue | ||
) |
Definition at line 180 of file gem.c.
References QuantumRange.
MagickPrivate void ConvertHCLToRGB | ( | const double | hue, |
const double | chroma, | ||
const double | luma, | ||
double * | red, | ||
double * | green, | ||
double * | blue | ||
) |
Definition at line 87 of file gem.c.
References QuantumRange.
MagickPrivate void ConvertHSBToRGB | ( | const double | hue, |
const double | saturation, | ||
const double | brightness, | ||
double * | red, | ||
double * | green, | ||
double * | blue | ||
) |
Definition at line 285 of file gem.c.
References MagickEpsilon, and QuantumRange.
MagickPrivate void ConvertHSIToRGB | ( | const double | hue, |
const double | saturation, | ||
const double | intensity, | ||
double * | red, | ||
double * | green, | ||
double * | blue | ||
) |
Definition at line 388 of file gem.c.
References MagickPI, and QuantumRange.
MagickExport void ConvertHSLToRGB | ( | const double | hue, |
const double | saturation, | ||
const double | lightness, | ||
double * | red, | ||
double * | green, | ||
double * | blue | ||
) |
Definition at line 461 of file gem.c.
References QuantumRange.
Referenced by ModulateHSL(), QueryColorCompliance(), and TransformsRGBImage().
MagickPrivate void ConvertHSVToRGB | ( | const double | hue, |
const double | saturation, | ||
const double | value, | ||
double * | red, | ||
double * | green, | ||
double * | blue | ||
) |
Definition at line 565 of file gem.c.
References QuantumRange.
MagickPrivate void ConvertHWBToRGB | ( | const double | hue, |
const double | whiteness, | ||
const double | blackness, | ||
double * | red, | ||
double * | green, | ||
double * | blue | ||
) |
Definition at line 666 of file gem.c.
References CastDoubleToLong(), MagickEpsilon, and QuantumRange.
MagickPrivate void ConvertLCHabToRGB | ( | const double | luma, |
const double | chroma, | ||
const double | hue, | ||
const IlluminantType | illuminant, | ||
double * | red, | ||
double * | green, | ||
double * | blue | ||
) |
Definition at line 751 of file gem.c.
References ConvertLCHabToXYZ(), and ConvertXYZToRGB().
|
inlinestatic |
Definition at line 743 of file gem.c.
References ConvertLabToXYZ(), and MagickPI.
Referenced by ConvertLCHabToRGB().
MagickPrivate void ConvertLCHuvToRGB | ( | const double | luma, |
const double | chroma, | ||
const double | hue, | ||
const IlluminantType | illuminant, | ||
double * | red, | ||
double * | green, | ||
double * | blue | ||
) |
Definition at line 807 of file gem.c.
References ConvertLCHuvToXYZ(), and ConvertXYZToRGB().
|
inlinestatic |
Definition at line 799 of file gem.c.
References ConvertLuvToXYZ(), and MagickPI.
Referenced by ConvertLCHuvToRGB().
MagickPrivate void ConvertRGBToHCL | ( | const double | red, |
const double | green, | ||
const double | blue, | ||
double * | hue, | ||
double * | chroma, | ||
double * | luma | ||
) |
Definition at line 855 of file gem.c.
References MagickEpsilon, MagickMax, MagickMin, and QuantumScale.
MagickPrivate void ConvertRGBToHCLp | ( | const double | red, |
const double | green, | ||
const double | blue, | ||
double * | hue, | ||
double * | chroma, | ||
double * | luma | ||
) |
Definition at line 916 of file gem.c.
References MagickEpsilon, MagickMax, MagickMin, and QuantumScale.
MagickPrivate void ConvertRGBToHSB | ( | const double | red, |
const double | green, | ||
const double | blue, | ||
double * | hue, | ||
double * | saturation, | ||
double * | brightness | ||
) |
Definition at line 977 of file gem.c.
References MagickEpsilon, and QuantumScale.
MagickPrivate void ConvertRGBToHSI | ( | const double | red, |
const double | green, | ||
const double | blue, | ||
double * | hue, | ||
double * | saturation, | ||
double * | intensity | ||
) |
Definition at line 1047 of file gem.c.
References MagickMin, MagickPI, and QuantumScale.
MagickExport void ConvertRGBToHSL | ( | const double | red, |
const double | green, | ||
const double | blue, | ||
double * | hue, | ||
double * | saturation, | ||
double * | lightness | ||
) |
Definition at line 1104 of file gem.c.
References MagickEpsilon, MagickMax, MagickMin, PerceptibleReciprocal(), and QuantumScale.
Referenced by ColorThresholdImage(), ExecuteRPN(), GetHslFlt(), GetHslInt(), ModulateHSL(), and sRGBTransformImage().
MagickPrivate void ConvertRGBToHSV | ( | const double | red, |
const double | green, | ||
const double | blue, | ||
double * | hue, | ||
double * | saturation, | ||
double * | value | ||
) |
Definition at line 1176 of file gem.c.
References MagickEpsilon, MagickMax, MagickMin, PerceptibleReciprocal(), and QuantumScale.
MagickPrivate void ConvertRGBToHWB | ( | const double | red, |
const double | green, | ||
const double | blue, | ||
double * | hue, | ||
double * | whiteness, | ||
double * | blackness | ||
) |
Definition at line 1245 of file gem.c.
References MagickEpsilon, MagickMax, MagickMin, and QuantumScale.
MagickPrivate void ConvertRGBToLab | ( | const double | red, |
const double | green, | ||
const double | blue, | ||
const IlluminantType | illuminant, | ||
double * | L, | ||
double * | a, | ||
double * | b | ||
) |
Definition at line 1303 of file gem.c.
References ConvertRGBToXYZ(), and ConvertXYZToLab().
MagickPrivate void ConvertRGBToLCHab | ( | const double | red, |
const double | green, | ||
const double | blue, | ||
const IlluminantType | illuminant, | ||
double * | luma, | ||
double * | chroma, | ||
double * | hue | ||
) |
Definition at line 1360 of file gem.c.
References ConvertRGBToXYZ(), and ConvertXYZToLCHab().
MagickPrivate void ConvertRGBToLCHuv | ( | const double | red, |
const double | green, | ||
const double | blue, | ||
const IlluminantType | illuminant, | ||
double * | luma, | ||
double * | chroma, | ||
double * | hue | ||
) |
Definition at line 1423 of file gem.c.
References ConvertRGBToXYZ(), and ConvertXYZToLCHuv().
Referenced by ModulateLCHuv(), and sRGBTransformImage().
|
inlinestatic |
Definition at line 1345 of file gem.c.
References ConvertXYZToLab(), and MagickPI.
Referenced by ConvertRGBToLCHab().
|
inlinestatic |
Definition at line 1408 of file gem.c.
References ConvertXYZToLuv(), and MagickPI.
Referenced by ConvertRGBToLCHuv().
MagickExport double ExpandAffine | ( | const AffineMatrix * | affine | ) |
Definition at line 1469 of file gem.c.
References _AffineMatrix::rx, _AffineMatrix::ry, _AffineMatrix::sx, and _AffineMatrix::sy.
Referenced by DrawBoundingRectangles(), DrawDashPolygon(), DrawPolygonPrimitive(), DrawPrimitive(), RenderMVGContent(), RenderPostscript(), and TraceStrokePolygon().
MagickPrivate double GenerateDifferentialNoise | ( | RandomInfo * | random_info, |
const Quantum | pixel, | ||
const NoiseType | noise_type, | ||
const double | attenuate | ||
) |
Definition at line 1504 of file gem.c.
References GaussianNoise, GetPseudoRandomValue(), ImpulseNoise, LaplacianNoise, MagickEpsilon, MagickPI, MultiplicativeGaussianNoise, PerceptibleReciprocal(), PoissonNoise, QuantumRange, QuantumScale, random_info, RandomNoise, SigmaGaussian, SigmaImpulse, SigmaLaplacian, SigmaMultiplicativeGaussian, SigmaPoisson, SigmaRandom, SigmaUniform, TauGaussian, and UniformNoise.
Referenced by AddNoiseImage(), and ApplyEvaluateOperator().
MagickPrivate size_t GetOptimalKernelWidth | ( | const double | radius, |
const double | sigma | ||
) |
Definition at line 1725 of file gem.c.
References GetOptimalKernelWidth1D().
MagickPrivate size_t GetOptimalKernelWidth1D | ( | const double | radius, |
const double | sigma | ||
) |
Definition at line 1643 of file gem.c.
References GetMagickModule, IsEventLogging(), LogMagickEvent(), MagickEpsilon, MagickFalse, MagickSQ2PI, PerceptibleReciprocal(), QuantumScale, and TraceEvent.
Referenced by GetOptimalKernelWidth().
MagickPrivate size_t GetOptimalKernelWidth2D | ( | const double | radius, |
const double | sigma | ||
) |
Definition at line 1683 of file gem.c.
References GetMagickModule, IsEventLogging(), LogMagickEvent(), Magick2PI, MagickEpsilon, MagickFalse, PerceptibleReciprocal(), QuantumScale, and TraceEvent.
Referenced by AcquireKernelBuiltIn(), AdaptiveBlurImage(), AdaptiveSharpenImage(), OilPaintImage(), and SharpenImage().