MagickCore 6.9.12
|
#include "magick/studio.h"
#include "magick/attribute.h"
#include "magick/cache.h"
#include "magick/cache-private.h"
#include "magick/cache-view.h"
#include "magick/color.h"
#include "magick/color-private.h"
#include "magick/colorspace.h"
#include "magick/colorspace-private.h"
#include "magick/exception.h"
#include "magick/exception-private.h"
#include "magick/enhance.h"
#include "magick/image.h"
#include "magick/image-private.h"
#include "magick/gem.h"
#include "magick/gem-private.h"
#include "magick/memory_.h"
#include "magick/monitor.h"
#include "magick/monitor-private.h"
#include "magick/pixel-private.h"
#include "magick/property.h"
#include "magick/quantize.h"
#include "magick/quantum.h"
#include "magick/resource_.h"
#include "magick/string_.h"
#include "magick/string-private.h"
#include "magick/utility.h"
Go to the source code of this file.
Data Structures | |
struct | _TransformPacket |
Macros | |
#define | RGBTransformImageTag "RGBTransform/Image" |
#define | DisplayGamma (1.0/1.7) |
#define | FilmGamma 0.6 |
#define | ReferenceBlack 95.0 |
#define | ReferenceWhite 685.0 |
#define | TransformRGBImageTag "Transform/Image" |
Typedefs | |
typedef struct _TransformPacket | TransformPacket |
Functions | |
MagickExport ColorspaceType | GetImageColorspaceType (const Image *image, ExceptionInfo *exception) |
static void | ConvertRGBToCMY (const Quantum red, const Quantum green, const Quantum blue, double *cyan, double *magenta, double *yellow) |
static void | ConvertRGBToLab (const Quantum red, const Quantum green, const Quantum blue, double *L, double *a, double *b) |
static void | ConvertXYZToLMS (const double x, const double y, const double z, double *L, double *M, double *S) |
static void | ConvertRGBToLMS (const Quantum red, const Quantum green, const Quantum blue, double *L, double *M, double *S) |
static void | ConvertRGBToLuv (const Quantum red, const Quantum green, const Quantum blue, double *L, double *u, double *v) |
static void | ConvertRGBToxyY (const Quantum red, const Quantum green, const Quantum blue, double *low_x, double *low_y, double *cap_Y) |
static void | ConvertRGBToYPbPr (const Quantum red, const Quantum green, const Quantum blue, double *Y, double *Pb, double *Pr) |
static void | ConvertRGBToYCbCr (const Quantum red, const Quantum green, const Quantum blue, double *Y, double *Cb, double *Cr) |
static void | ConvertRGBToYUV (const Quantum red, const Quantum green, const Quantum blue, double *Y, double *U, double *V) |
static void | ConvertRGBToYDbDr (const Quantum red, const Quantum green, const Quantum blue, double *Y, double *Db, double *Dr) |
static void | ConvertRGBToYIQ (const Quantum red, const Quantum green, const Quantum blue, double *Y, double *I, double *Q) |
MagickExport MagickBooleanType | RGBTransformImage (Image *image, const ColorspaceType colorspace) |
MagickExport MagickBooleanType | SetImageColorspace (Image *image, const ColorspaceType colorspace) |
MagickExport MagickBooleanType | SetImageGray (Image *image, ExceptionInfo *exception) |
MagickExport MagickBooleanType | SetImageMonochrome (Image *image, ExceptionInfo *exception) |
MagickExport MagickBooleanType | TransformImageColorspace (Image *image, const ColorspaceType colorspace) |
static void | ConvertCMYToRGB (const double cyan, const double magenta, const double yellow, Quantum *red, Quantum *green, Quantum *blue) |
static void | ConvertLMSToXYZ (const double L, const double M, const double S, double *X, double *Y, double *Z) |
static void | ConvertLMSToRGB (const double L, const double M, const double S, Quantum *red, Quantum *green, Quantum *blue) |
static void | ConvertLuvToRGB (const double L, const double u, const double v, Quantum *red, Quantum *green, Quantum *blue) |
static ssize_t | RoundToYCC (const MagickRealType value) |
static void | ConvertLabToRGB (const double L, const double a, const double b, Quantum *red, Quantum *green, Quantum *blue) |
static void | ConvertxyYToRGB (const double low_x, const double low_y, const double cap_Y, Quantum *red, Quantum *green, Quantum *blue) |
static void | ConvertYPbPrToRGB (const double Y, const double Pb, const double Pr, Quantum *red, Quantum *green, Quantum *blue) |
static void | ConvertYCbCrToRGB (const double Y, const double Cb, const double Cr, Quantum *red, Quantum *green, Quantum *blue) |
static void | ConvertYDbDrToRGB (const double Y, const double Db, const double Dr, Quantum *red, Quantum *green, Quantum *blue) |
static void | ConvertYIQToRGB (const double Y, const double I, const double Q, Quantum *red, Quantum *green, Quantum *blue) |
static void | ConvertYUVToRGB (const double Y, const double U, const double V, Quantum *red, Quantum *green, Quantum *blue) |
MagickExport MagickBooleanType | TransformRGBImage (Image *image, const ColorspaceType colorspace) |
#define DisplayGamma (1.0/1.7) |
#define FilmGamma 0.6 |
#define ReferenceBlack 95.0 |
#define ReferenceWhite 685.0 |
#define RGBTransformImageTag "RGBTransform/Image" |
#define TransformRGBImageTag "Transform/Image" |
typedef struct _TransformPacket TransformPacket |
|
inlinestatic |
Definition at line 1573 of file colorspace.c.
References ClampToQuantum(), and QuantumRange.
Referenced by TransformRGBImage().
|
inlinestatic |
Definition at line 1622 of file colorspace.c.
References ConvertLabToXYZ(), and ConvertXYZToRGB().
Referenced by TransformRGBImage().
|
inlinestatic |
Definition at line 1589 of file colorspace.c.
References ConvertLMSToXYZ(), and ConvertXYZToRGB().
Referenced by TransformRGBImage().
|
inlinestatic |
Definition at line 1581 of file colorspace.c.
Referenced by ConvertLMSToRGB().
|
inlinestatic |
Definition at line 1601 of file colorspace.c.
References ConvertLuvToXYZ(), and ConvertXYZToRGB().
Referenced by TransformRGBImage().
|
inlinestatic |
Definition at line 162 of file colorspace.c.
References QuantumRange, and QuantumScale.
Referenced by RGBTransformImage().
|
static |
Definition at line 170 of file colorspace.c.
References ConvertRGBToXYZ(), and ConvertXYZToLab().
Referenced by RGBTransformImage().
|
static |
Definition at line 190 of file colorspace.c.
References ConvertRGBToXYZ(), and ConvertXYZToLMS().
Referenced by RGBTransformImage().
|
static |
Definition at line 202 of file colorspace.c.
References ConvertRGBToXYZ(), and ConvertXYZToLuv().
Referenced by RGBTransformImage().
|
static |
Definition at line 214 of file colorspace.c.
References ConvertRGBToXYZ(), and PerceptibleReciprocal().
Referenced by RGBTransformImage().
|
static |
Definition at line 238 of file colorspace.c.
References ConvertRGBToYPbPr().
Referenced by RGBTransformImage().
|
static |
Definition at line 252 of file colorspace.c.
References QuantumScale.
Referenced by RGBTransformImage().
|
static |
Definition at line 260 of file colorspace.c.
References QuantumScale.
Referenced by RGBTransformImage().
|
static |
Definition at line 230 of file colorspace.c.
References QuantumScale.
Referenced by ConvertRGBToYCbCr(), and RGBTransformImage().
|
static |
Definition at line 244 of file colorspace.c.
References QuantumScale.
Referenced by RGBTransformImage().
|
inlinestatic |
Definition at line 1634 of file colorspace.c.
References ConvertXYZToRGB(), and PerceptibleReciprocal().
Referenced by TransformRGBImage().
|
inlinestatic |
Definition at line 182 of file colorspace.c.
Referenced by ConvertRGBToLMS().
|
static |
Definition at line 1661 of file colorspace.c.
References ConvertYPbPrToRGB().
Referenced by TransformRGBImage().
|
static |
Definition at line 1667 of file colorspace.c.
References ClampToQuantum(), and QuantumRange.
Referenced by TransformRGBImage().
|
static |
Definition at line 1678 of file colorspace.c.
References ClampToQuantum(), and QuantumRange.
Referenced by TransformRGBImage().
|
static |
Definition at line 1650 of file colorspace.c.
References ClampToQuantum(), and QuantumRange.
Referenced by ConvertYCbCrToRGB(), and TransformRGBImage().
|
static |
Definition at line 1689 of file colorspace.c.
References ClampToQuantum(), and QuantumRange.
Referenced by TransformRGBImage().
MagickExport ColorspaceType GetImageColorspaceType | ( | const Image * | image, |
ExceptionInfo * | exception | ||
) |
Definition at line 112 of file colorspace.c.
References BilevelType, _Image::colorspace, _Image::filename, GetMagickModule, GRAYColorspace, GrayscaleMatteType, GrayscaleType, IdentifyImageType(), IsEventLogging(), LogMagickEvent(), MagickCoreSignature, MagickFalse, _Image::signature, and TraceEvent.
MagickExport MagickBooleanType RGBTransformImage | ( | Image * | image, |
const ColorspaceType | colorspace | ||
) |
Definition at line 268 of file colorspace.c.
References AcquireAuthenticCacheView(), AcquireQuantumMemory(), _MagickPixelPacket::blue, _PixelPacket::blue, ClampToQuantum(), CMYColorspace, CMYKColorspace, _Image::colormap, _Image::colors, ColorSeparationMatteType, ColorSeparationType, _Image::columns, ConvertRGBToCMY(), ConvertRGBToCMYK(), ConvertRGBToHCL(), ConvertRGBToHCLp(), ConvertRGBToHSB(), ConvertRGBToHSI(), ConvertRGBToHSL(), ConvertRGBToHSV(), ConvertRGBToHWB(), ConvertRGBToLab(), ConvertRGBToLCHab(), ConvertRGBToLCHuv(), ConvertRGBToLMS(), ConvertRGBToLuv(), ConvertRGBToxyY(), ConvertRGBToXYZ(), ConvertRGBToYCbCr(), ConvertRGBToYDbDr(), ConvertRGBToYIQ(), ConvertRGBToYPbPr(), ConvertRGBToYUV(), DecodePixelGamma(), DestroyCacheView(), DirectClass, DisplayGamma, _Image::exception, _Image::filename, FilmGamma, GetCacheViewAuthenticIndexQueue(), GetCacheViewAuthenticPixels(), GetImageProperty(), GetMagickModule, GetMagickPixelPacket(), GetPixelBlue, GetPixelGreen, GetPixelRed, GRAYColorspace, GrayscaleType, _MagickPixelPacket::green, _PixelPacket::green, HCLColorspace, HCLpColorspace, HSBColorspace, HSIColorspace, HSLColorspace, HSVColorspace, HWBColorspace, IsEventLogging(), LabColorspace, LCHabColorspace, LCHColorspace, LCHuvColorspace, LinearGRAYColorspace, LMSColorspace, LogColorspace, LogMagickEvent(), LuvColorspace, magick_restrict, MagickCoreSignature, MagickFalse, MagickTrue, _Image::matte, MaxMap, OHTAColorspace, PerceptibleReciprocal(), _Image::progress_monitor, PseudoClass, QuantumRange, QuantumScale, Rec601LumaColorspace, Rec601YCbCrColorspace, Rec709LumaColorspace, Rec709YCbCrColorspace, _MagickPixelPacket::red, _PixelPacket::red, ReferenceBlack, ReferenceWhite, RelinquishMagickMemory(), ResourceLimitError, RGBColorspace, RGBTransformImageTag, _Image::rows, scRGBColorspace, SetImageColorspace(), SetImageProgress(), SetImageStorageClass(), SetMagickPixelPacket(), SetPixelBlue, SetPixelGray, SetPixelGreen, SetPixelPacket(), SetPixelRed, _Image::signature, sRGBColorspace, _Image::storage_class, StringToDouble(), SyncCacheViewAuthenticPixels(), SyncImage(), ThrowBinaryException, TraceEvent, TransparentColorspace, _Image::type, UndefinedColorspace, _TransformPacket::x, _PrimaryInfo::x, xyYColorspace, XYZColorspace, _TransformPacket::y, _PrimaryInfo::y, YCbCrColorspace, YCCColorspace, YDbDrColorspace, YIQColorspace, YPbPrColorspace, YUVColorspace, _TransformPacket::z, and _PrimaryInfo::z.
Referenced by TransformImageColorspace().
|
inlinestatic |
Definition at line 1613 of file colorspace.c.
Referenced by TransformRGBImage().
MagickExport MagickBooleanType SetImageColorspace | ( | Image * | image, |
const ColorspaceType | colorspace | ||
) |
Definition at line 1251 of file colorspace.c.
References _ChromaticityInfo::blue_primary, _Image::chromaticity, _Image::colorspace, _Image::exception, _Image::filename, _Image::gamma, GetMagickModule, GrayscaleType, _ChromaticityInfo::green_primary, IsEventLogging(), IsGrayColorspace(), IsRGBColorspace(), LinearGRAYColorspace, LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickTrue, PerceptualIntent, _ChromaticityInfo::red_primary, _Image::rendering_intent, _Image::signature, SyncImagePixelCache(), TraceEvent, _Image::type, UndefinedIntent, _ChromaticityInfo::white_point, _PrimaryInfo::x, xyYColorspace, XYZColorspace, _PrimaryInfo::y, and _PrimaryInfo::z.
Referenced by AnnotateImage(), AppendImages(), BilevelImageChannel(), BlackThresholdImageChannel(), ClutImageChannel(), ColorizeImage(), CombineImages(), CompositeImageChannel(), ConsolidateCMYKImages(), ContrastStretchImageChannel(), DistortImage(), DrawPrimitive(), FloodfillPaintImage(), FrameImage(), GrayscaleImage(), HaldClutImageChannel(), ImportImagePixels(), LevelColorsImageChannel(), ModulateImage(), ProfileImage(), RGBTransformImage(), SeparateImageChannel(), SetImageProperty(), SetPixelCacheVirtualMethod(), ShadowImage(), SolarizeImageChannel(), StereoAnaglyphImage(), TintImage(), TransformImageColorspace(), TransformRGBImage(), and WhiteThresholdImageChannel().
MagickExport MagickBooleanType SetImageGray | ( | Image * | image, |
ExceptionInfo * | exception | ||
) |
Definition at line 1329 of file colorspace.c.
References AcquireVirtualCacheView(), BilevelType, _Image::colorspace, _Image::columns, DestroyCacheView(), _Image::filename, GetCacheViewVirtualPixels(), GetImageProperty(), GetMagickModule, GRAYColorspace, GrayscaleMatteType, GrayscaleType, IsEventLogging(), IsGrayColorspace(), IsGrayPixel(), IsMonochromePixel(), IssRGBCompatibleColorspace(), IsStringNotFalse(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickTrue, _Image::matte, _Image::rows, _Image::signature, SyncImagePixelCache(), TraceEvent, _Image::type, and UndefinedType.
Referenced by ContrastStretchImageChannel(), GetMagickPropertyLetter(), and QuantizeImage().
MagickExport MagickBooleanType SetImageMonochrome | ( | Image * | image, |
ExceptionInfo * | exception | ||
) |
Definition at line 1423 of file colorspace.c.
References AcquireVirtualCacheView(), BilevelType, _Image::colorspace, _Image::columns, DestroyCacheView(), _Image::exception, _Image::filename, GetCacheViewVirtualPixels(), GetImageProperty(), GetMagickModule, GRAYColorspace, IsEventLogging(), IsGrayColorspace(), IsMonochromeImage(), IsMonochromePixel(), IssRGBCompatibleColorspace(), IsStringNotFalse(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickTrue, _Image::rows, _Image::signature, SyncImagePixelCache(), TraceEvent, _Image::type, and UndefinedType.
Referenced by SetGrayscaleImage().
MagickExport MagickBooleanType TransformImageColorspace | ( | Image * | image, |
const ColorspaceType | colorspace | ||
) |
Definition at line 1510 of file colorspace.c.
References _Image::colorspace, DeleteImageProfile(), _Image::filename, GetMagickModule, IsEventLogging(), IssRGBColorspace(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickTrue, RGBTransformImage(), SetImageColorspace(), _Image::signature, TraceEvent, TransformRGBImage(), and UndefinedColorspace.
Referenced by AssignImageColors(), CannyEdgeImage(), ClassifyImageColors(), CombineImages(), ConformMagickPixelPacket(), GetImageChannelPerceptualHash(), SegmentImage(), SelectiveBlurImageChannel(), SetGrayscaleImage(), SetImageBackgroundColor(), SetImageType(), TextureImage(), TransformColorspace(), and VignetteImage().
MagickExport MagickBooleanType TransformRGBImage | ( | Image * | image, |
const ColorspaceType | colorspace | ||
) |
Definition at line 1700 of file colorspace.c.
References AcquireAuthenticCacheView(), AcquireQuantumMemory(), _MagickPixelPacket::blue, _PixelPacket::blue, ClampToQuantum(), CMYColorspace, CMYKColorspace, _Image::colormap, _Image::colors, _Image::columns, ConvertCMYKToRGB(), ConvertCMYToRGB(), ConvertHCLpToRGB(), ConvertHCLToRGB(), ConvertHSBToRGB(), ConvertHSIToRGB(), ConvertHSLToRGB(), ConvertHSVToRGB(), ConvertHWBToRGB(), ConvertLabToRGB(), ConvertLCHabToRGB(), ConvertLCHuvToRGB(), ConvertLMSToRGB(), ConvertLuvToRGB(), ConvertxyYToRGB(), ConvertXYZToRGB(), ConvertYCbCrToRGB(), ConvertYDbDrToRGB(), ConvertYIQToRGB(), ConvertYPbPrToRGB(), ConvertYUVToRGB(), DestroyCacheView(), DirectClass, DisplayGamma, EncodePixelGamma(), _Image::exception, _Image::filename, FilmGamma, GetCacheViewAuthenticIndexQueue(), GetCacheViewAuthenticPixels(), GetImageProperty(), GetMagickModule, GetMagickPixelPacket(), GetPixelBlue, GetPixelGreen, GetPixelRed, GRAYColorspace, _MagickPixelPacket::green, _PixelPacket::green, HCLColorspace, HCLpColorspace, HSBColorspace, HSIColorspace, HSLColorspace, HSVColorspace, HWBColorspace, IsEventLogging(), LabColorspace, LCHabColorspace, LCHColorspace, LCHuvColorspace, LinearGRAYColorspace, LMSColorspace, LogColorspace, LogMagickEvent(), LuvColorspace, magick_restrict, MagickCoreSignature, MagickFalse, MagickTrue, MaxMap, OHTAColorspace, PerceptibleReciprocal(), _Image::progress_monitor, PseudoClass, QuantumRange, QuantumScale, Rec601LumaColorspace, Rec601YCbCrColorspace, Rec709LumaColorspace, Rec709YCbCrColorspace, _MagickPixelPacket::red, _PixelPacket::red, ReferenceBlack, ReferenceWhite, RelinquishMagickMemory(), ResourceLimitError, RGBColorspace, RoundToYCC(), _Image::rows, scRGBColorspace, SetImageColorspace(), SetImageProgress(), SetImageStorageClass(), SetMagickPixelPacket(), SetPixelBlue, SetPixelGreen, SetPixelPacket(), SetPixelRed, _Image::signature, sRGBColorspace, _Image::storage_class, StringToDouble(), SyncCacheViewAuthenticPixels(), SyncImage(), ThrowBinaryException, TraceEvent, TransformRGBImageTag, _TransformPacket::x, xyYColorspace, XYZColorspace, _TransformPacket::y, YCbCrColorspace, YCCColorspace, YDbDrColorspace, YIQColorspace, YPbPrColorspace, YUVColorspace, and _TransformPacket::z.
Referenced by TransformImageColorspace().