MagickCore  6.7.5
colorspace.c File Reference
Include dependency graph for colorspace.c:

Go to the source code of this file.

Data Structures

struct  _TransformPacket

Defines

#define D50X   (0.9642)
#define D50Y   (1.0)
#define D50Z   (0.8249)
#define RGBTransformImageTag   "RGBTransform/Image"
#define DisplayGamma   (1.0/1.7)
#define FilmGamma   0.6
#define ReferenceBlack   95.0
#define ReferenceWhite   685.0
#define D50X   (0.9642)
#define D50Y   (1.0)
#define D50Z   (0.8249)
#define TransformRGBImageTag   "Transform/Image"

Typedefs

typedef struct _TransformPacket TransformPacket

Functions

static void ConvertRGBToXYZ (const Quantum red, const Quantum green, const Quantum blue, double *X, double *Y, double *Z)
static double LabF1 (double alpha)
static void ConvertXYZToLab (const double X, const double Y, const double Z, double *L, double *a, double *b)
MagickExport MagickBooleanType RGBTransformImage (Image *image, const ColorspaceType colorspace, ExceptionInfo *exception)
MagickExport MagickBooleanType SetImageColorspace (Image *image, const ColorspaceType colorspace, ExceptionInfo *exception)
MagickExport MagickBooleanType TransformImageColorspace (Image *image, const ColorspaceType colorspace, ExceptionInfo *exception)
static double LabF2 (double alpha)
static void ConvertLabToXYZ (const double L, const double a, const double b, double *X, double *Y, double *Z)
static ssize_t RoundToYCC (const MagickRealType value)
static void ConvertXYZToRGB (const double x, const double y, const double z, Quantum *red, Quantum *green, Quantum *blue)
static void ConvertCMYKToRGB (PixelInfo *pixel)
MagickExport MagickBooleanType TransformRGBImage (Image *image, const ColorspaceType colorspace, ExceptionInfo *exception)

Define Documentation

#define D50X   (0.9642)

Referenced by ConvertXYZToLab(), and ConvertLabToXYZ().

#define D50X   (0.9642)
#define D50Y   (1.0)

Referenced by ConvertXYZToLab(), and ConvertLabToXYZ().

#define D50Y   (1.0)
#define D50Z   (0.8249)

Referenced by ConvertXYZToLab(), and ConvertLabToXYZ().

#define D50Z   (0.8249)
#define DisplayGamma   (1.0/1.7)
#define FilmGamma   0.6
#define ReferenceBlack   95.0
#define ReferenceWhite   685.0
#define RGBTransformImageTag   "RGBTransform/Image"

Referenced by RGBTransformImage().

#define TransformRGBImageTag   "Transform/Image"

Referenced by TransformRGBImage().


Typedef Documentation


Function Documentation

static void ConvertCMYKToRGB ( PixelInfo pixel) [inline, static]
static void ConvertLabToXYZ ( const double  L,
const double  a,
const double  b,
double *  X,
double *  Y,
double *  Z 
) [inline, static]

Definition at line 1312 of file colorspace.c.

References D50X, LabF2(), D50Y, and D50Z.

Referenced by TransformRGBImage().

static void ConvertRGBToXYZ ( const Quantum  red,
const Quantum  green,
const Quantum  blue,
double *  X,
double *  Y,
double *  Z 
) [inline, static]

Definition at line 110 of file colorspace.c.

References QuantumScale.

Referenced by RGBTransformImage().

static void ConvertXYZToLab ( const double  X,
const double  Y,
const double  Z,
double *  L,
double *  a,
double *  b 
) [inline, static]

Definition at line 149 of file colorspace.c.

References MagickEpsilon, LabF1(), D50X, D50Y, and D50Z.

Referenced by RGBTransformImage().

static void ConvertXYZToRGB ( const double  x,
const double  y,
const double  z,
Quantum red,
Quantum green,
Quantum blue 
) [inline, static]

Definition at line 1346 of file colorspace.c.

References RoundToQuantum, and QuantumRange.

Referenced by TransformRGBImage().

static double LabF1 ( double  alpha) [static]

Definition at line 141 of file colorspace.c.

Referenced by ConvertXYZToLab().

static double LabF2 ( double  alpha) [static]

Definition at line 1299 of file colorspace.c.

Referenced by ConvertLabToXYZ().

MagickExport MagickBooleanType RGBTransformImage ( Image image,
const ColorspaceType  colorspace,
ExceptionInfo exception 
)

Definition at line 182 of file colorspace.c.

References _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, RGBColorspace, TransparentColorspace, UndefinedColorspace, IsRGBColorspace(), _Image::colorspace, TransformRGBImage(), SetImageColorspace(), MagickTrue, CMYColorspace, _Image::storage_class, PseudoClass, SyncImage(), SetImageStorageClass(), DirectClass, AcquireCacheView(), _Image::rows, GetCacheViewAuthenticPixels(), _Image::columns, SetPixelRed(), ClampToQuantum(), QuantumRange, GetPixelRed(), SetPixelGreen(), GetPixelGreen(), SetPixelBlue(), GetPixelBlue(), GetPixelChannels(), SyncCacheViewAuthenticPixels(), DestroyCacheView(), _Image::type, _Image::matte, ColorSeparationType, ColorSeparationMatteType, CMYKColorspace, GetPixelInfo(), GetPixelInfoPixel(), ConvertRGBToCMYK(), SetPixelInfoPixel(), HSBColorspace, ConvertRGBToHSB(), HSLColorspace, ConvertRGBToHSL(), HWBColorspace, ConvertRGBToHWB(), LabColorspace, ConvertRGBToXYZ(), ConvertXYZToLab(), LogColorspace, DisplayGamma, GetImageProperty(), StringToDouble(), MagickEpsilon, FilmGamma, ReferenceBlack, ReferenceWhite, AcquireQuantumMemory(), MaxMap, ThrowBinaryException, ResourceLimitError, RelinquishMagickMemory(), ResetMagickMemory(), OHTAColorspace, _PrimaryInfo::y, _PrimaryInfo::z, _TransformPacket::x, _TransformPacket::y, _TransformPacket::z, Rec601LumaColorspace, GRAYColorspace, GrayscaleType, Rec601YCbCrColorspace, YCbCrColorspace, Rec709LumaColorspace, Rec709YCbCrColorspace, sRGBColorspace, XYZColorspace, YCCColorspace, YIQColorspace, YPbPrColorspace, YUVColorspace, _PixelInfo::red, _PrimaryInfo::x, _PixelInfo::green, _PixelInfo::blue, _Image::progress_monitor, SetImageProgress(), RGBTransformImageTag, _Image::colors, and _Image::colormap.

Referenced by TransformImageColorspace().

static ssize_t RoundToYCC ( const MagickRealType  value) [inline, static]

Definition at line 1337 of file colorspace.c.

Referenced by TransformRGBImage().

MagickExport MagickBooleanType SetImageColorspace ( Image image,
const ColorspaceType  colorspace,
ExceptionInfo exception 
)
MagickExport MagickBooleanType TransformRGBImage ( Image image,
const ColorspaceType  colorspace,
ExceptionInfo exception 
)

Definition at line 1390 of file colorspace.c.

References _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, IsRGBColorspace(), _Image::colorspace, MagickTrue, CMYColorspace, _Image::storage_class, PseudoClass, SyncImage(), SetImageStorageClass(), DirectClass, AcquireCacheView(), _Image::rows, GetCacheViewAuthenticPixels(), _Image::columns, SetPixelRed(), ClampToQuantum(), QuantumRange, GetPixelRed(), SetPixelGreen(), GetPixelGreen(), SetPixelBlue(), GetPixelBlue(), GetPixelChannels(), SyncCacheViewAuthenticPixels(), DestroyCacheView(), SetImageColorspace(), RGBColorspace, CMYKColorspace, GetPixelInfo(), GetPixelInfoPixel(), ConvertCMYKToRGB(), SetPixelInfoPixel(), HSBColorspace, QuantumScale, ConvertHSBToRGB(), HSLColorspace, ConvertHSLToRGB(), HWBColorspace, ConvertHWBToRGB(), LabColorspace, ConvertLabToXYZ(), ConvertXYZToRGB(), LogColorspace, DisplayGamma, GetImageProperty(), StringToDouble(), MagickEpsilon, FilmGamma, ReferenceBlack, ReferenceWhite, AcquireQuantumMemory(), MaxMap, ThrowBinaryException, ResourceLimitError, RelinquishMagickMemory(), OHTAColorspace, _TransformPacket::x, _TransformPacket::y, _TransformPacket::z, Rec601YCbCrColorspace, YCbCrColorspace, Rec709YCbCrColorspace, sRGBColorspace, XYZColorspace, YCCColorspace, YIQColorspace, YPbPrColorspace, YUVColorspace, _PixelInfo::red, _PixelInfo::green, _PixelInfo::blue, RoundToYCC(), _Image::progress_monitor, SetImageProgress(), TransformRGBImageTag, _Image::colors, and _Image::colormap.

Referenced by RGBTransformImage(), and TransformImageColorspace().