MagickCore  7.0.0
profile.c File Reference
Include dependency graph for profile.c:

Go to the source code of this file.

Data Structures

struct  _ProfileInfo
 
struct  _CMSExceptionInfo
 

Macros

#define cmsSigCmykData   icSigCmykData
 
#define cmsSigGrayData   icSigGrayData
 
#define cmsSigLabData   icSigLabData
 
#define cmsSigLuvData   icSigLuvData
 
#define cmsSigRgbData   icSigRgbData
 
#define cmsSigXYZData   icSigXYZData
 
#define cmsSigYCbCrData   icSigYCbCrData
 
#define cmsSigLinkClass   icSigLinkClass
 
#define cmsColorSpaceSignature   icColorSpaceSignature
 
#define cmsUInt32Number   DWORD
 
#define cmsSetLogErrorHandler(handler)   cmsSetErrorHandler(handler)
 
#define cmsCreateTransformTHR(context, source_profile, source_type, target_profile, target_type, intent, flags)
 
#define cmsOpenProfileFromMemTHR(context, profile, length)   cmsOpenProfileFromMem(profile,length)
 
#define ProfileImageTag   "Profile/Image"
 
#define ThrowProfileException(severity, tag, context)
 
#define MaxDirectoryStack   16
 
#define EXIF_DELIMITER   "\n"
 
#define EXIF_NUM_FORMATS   12
 
#define TAG_EXIF_OFFSET   0x8769
 
#define TAG_INTEROP_OFFSET   0xa005
 

Typedefs

typedef struct _CMSExceptionInfo CMSExceptionInfo
 

Functions

MagickExport MagickBooleanType CloneImageProfiles (Image *image, const Image *clone_image)
 
MagickExport MagickBooleanType DeleteImageProfile (Image *image, const char *name)
 
MagickExport void DestroyImageProfiles (Image *image)
 
MagickExport const StringInfoGetImageProfile (const Image *image, const char *name)
 
MagickExport char * GetNextImageProfile (const Image *image)
 
MagickExport MagickBooleanType ProfileImage (Image *image, const char *name, const void *datum, const size_t length, ExceptionInfo *exception)
 
MagickExport StringInfoRemoveImageProfile (Image *image, const char *name)
 
MagickExport void ResetImageProfileIterator (const Image *image)
 
static void * DestroyProfile (void *profile)
 
static const unsigned char * ReadResourceByte (const unsigned char *p, unsigned char *quantum)
 
static const unsigned char * ReadResourceBytes (const unsigned char *p, const ssize_t count, unsigned char *quantum)
 
static const unsigned char * ReadResourceLong (const unsigned char *p, size_t *quantum)
 
static const unsigned char * ReadResourceShort (const unsigned char *p, unsigned short *quantum)
 
static MagickBooleanType GetProfilesFromResourceBlock (Image *image, const StringInfo *resource_block, ExceptionInfo *exception)
 
MagickExport MagickBooleanType SetImageProfile (Image *image, const char *name, const StringInfo *profile, ExceptionInfo *exception)
 
static int ReadProfileByte (unsigned char **p, size_t *length)
 
static unsigned short ReadProfileShort (const EndianType endian, unsigned char *buffer)
 
static size_t ReadProfileLong (const EndianType endian, unsigned char *buffer)
 
static void WriteProfileLong (const EndianType endian, const size_t value, unsigned char *p)
 
static void WriteProfileShort (const EndianType endian, const unsigned short value, unsigned char *p)
 
MagickPrivate MagickBooleanType SyncImageProfiles (Image *image)
 

Macro Definition Documentation

#define cmsColorSpaceSignature   icColorSpaceSignature

Definition at line 94 of file profile.c.

Referenced by ProfileImage().

#define cmsCreateTransformTHR (   context,
  source_profile,
  source_type,
  target_profile,
  target_type,
  intent,
  flags 
)
Value:
cmsCreateTransform(source_profile, \
source_type,target_profile,target_type,intent,flags);

Definition at line 97 of file profile.c.

#define cmsOpenProfileFromMemTHR (   context,
  profile,
  length 
)    cmsOpenProfileFromMem(profile,length)

Definition at line 100 of file profile.c.

Referenced by ProfileImage().

#define cmsSetLogErrorHandler (   handler)    cmsSetErrorHandler(handler)

Definition at line 96 of file profile.c.

Referenced by ProfileImage().

#define cmsSigCmykData   icSigCmykData

Definition at line 86 of file profile.c.

Referenced by ProfileImage().

#define cmsSigGrayData   icSigGrayData

Definition at line 87 of file profile.c.

Referenced by ProfileImage().

#define cmsSigLabData   icSigLabData

Definition at line 88 of file profile.c.

Referenced by ProfileImage().

#define cmsSigLinkClass   icSigLinkClass

Definition at line 93 of file profile.c.

Referenced by ProfileImage().

#define cmsSigLuvData   icSigLuvData

Definition at line 89 of file profile.c.

Referenced by ProfileImage().

#define cmsSigRgbData   icSigRgbData

Definition at line 90 of file profile.c.

Referenced by ProfileImage().

#define cmsSigXYZData   icSigXYZData

Definition at line 91 of file profile.c.

Referenced by ProfileImage().

#define cmsSigYCbCrData   icSigYCbCrData

Definition at line 92 of file profile.c.

Referenced by ProfileImage().

#define cmsUInt32Number   DWORD

Definition at line 95 of file profile.c.

Referenced by IdentifyImage(), and ProfileImage().

#define EXIF_DELIMITER   "\n"
#define EXIF_NUM_FORMATS   12

Referenced by SyncImageProfiles().

#define MaxDirectoryStack   16
#define ProfileImageTag   "Profile/Image"

Referenced by ProfileImage().

#define TAG_EXIF_OFFSET   0x8769
#define TAG_INTEROP_OFFSET   0xa005
#define ThrowProfileException (   severity,
  tag,
  context 
)
Value:
{ \
if (source_profile != (cmsHPROFILE) NULL) \
(void) cmsCloseProfile(source_profile); \
if (target_profile != (cmsHPROFILE) NULL) \
(void) cmsCloseProfile(target_profile); \
ThrowBinaryException(severity,tag,context); \
}

Referenced by ProfileImage().

Typedef Documentation

Function Documentation

MagickExport void DestroyImageProfiles ( Image image)

Definition at line 228 of file profile.c.

References DestroySplayTree(), and _Image::profiles.

Referenced by DestroyImage(), and StripImage().

static void* DestroyProfile ( void *  profile)
static

Definition at line 1094 of file profile.c.

References DestroyStringInfo().

Referenced by SetImageProfile().

MagickExport MagickBooleanType ProfileImage ( Image image,
const char *  name,
const void *  datum,
const size_t  length,
ExceptionInfo exception 
)

Definition at line 479 of file profile.c.

References AbsoluteIntent, AcquireAuthenticCacheView(), AcquirePixelThreadSet(), AcquireStringInfo(), _Image::alpha_trait, _Image::black_point_compensation, BlendPixelTrait, cmsColorSpaceSignature, cmsOpenProfileFromMemTHR, cmsSetLogErrorHandler, cmsSigCmykData, cmsSigGrayData, cmsSigLabData, cmsSigLinkClass, cmsSigLuvData, cmsSigRgbData, cmsSigXYZData, cmsSigYCbCrData, cmsUInt32Number, CMYKColorspace, ColorSeparationMatteType, ColorSeparationType, _Image::colorspace, _Image::columns, CompareStringInfo(), ConstantString(), _Image::debug, DeleteImageProfile(), DestroyCacheView(), DestroyPixelThreadSet(), DestroyString(), DestroyStringInfo(), DirectClass, _CMSExceptionInfo::exception, _Image::filename, GetCacheViewAuthenticPixels(), GetImageProfile(), GetImageProperty(), GetMagickModule, GetNextImageProfile(), GetOpenMPThreadId(), GetPixelBlack(), GetPixelBlue(), GetPixelChannels(), GetPixelGreen(), GetPixelRed(), GetStringInfoDatum(), GetStringInfoLength(), GlobExpression(), GRAYColorspace, GrayscaleMatteType, GrayscaleType, _CMSExceptionInfo::image, ImageError, IsImageGray(), IssRGBCompatibleColorspace(), LabColorspace, LocaleCompare(), LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, MissingDelegateWarning, PerceptualIntent, ProfileImageTag, _Image::progress_monitor, RelativeIntent, RelinquishMagickMemory(), _Image::rendering_intent, ResetImageProfileIterator(), ResourceLimitError, _Image::rows, SaturationIntent, SetImageColorspace(), SetImageProfile(), SetImageProgress(), SetImageStorageClass(), SetPixelBlack(), SetPixelBlue(), SetPixelGray(), SetPixelGreen(), SetPixelRed(), SetStringInfoDatum(), _Image::signature, sRGBColorspace, StringToArgv(), SubstituteString(), SyncCacheViewAuthenticPixels(), ThrowBinaryException, ThrowMagickException(), ThrowProfileException, TraceEvent, TrueColorMatteType, TrueColorType, _Image::type, UndefinedColorspace, XYZColorspace, YCbCrColorspace, and YUVColorspace.

static int ReadProfileByte ( unsigned char **  p,
size_t *  length 
)
inlinestatic

Definition at line 1315 of file profile.c.

Referenced by SyncImageProfiles().

static size_t ReadProfileLong ( const EndianType  endian,
unsigned char *  buffer 
)
inlinestatic

Definition at line 1343 of file profile.c.

References LSBEndian.

Referenced by SyncImageProfiles().

static unsigned short ReadProfileShort ( const EndianType  endian,
unsigned char *  buffer 
)
inlinestatic

Definition at line 1327 of file profile.c.

References LSBEndian.

Referenced by SyncImageProfiles().

static const unsigned char* ReadResourceByte ( const unsigned char *  p,
unsigned char *  quantum 
)
inlinestatic

Definition at line 1099 of file profile.c.

Referenced by GetProfilesFromResourceBlock().

static const unsigned char* ReadResourceBytes ( const unsigned char *  p,
const ssize_t  count,
unsigned char *  quantum 
)
inlinestatic

Definition at line 1106 of file profile.c.

static const unsigned char* ReadResourceLong ( const unsigned char *  p,
size_t *  quantum 
)
inlinestatic

Definition at line 1117 of file profile.c.

Referenced by GetProfilesFromResourceBlock().

static const unsigned char* ReadResourceShort ( const unsigned char *  p,
unsigned short *  quantum 
)
inlinestatic

Definition at line 1127 of file profile.c.

Referenced by GetProfilesFromResourceBlock().

static void WriteProfileLong ( const EndianType  endian,
const size_t  value,
unsigned char *  p 
)
inlinestatic

Definition at line 1360 of file profile.c.

References CopyMagickMemory(), and LSBEndian.

Referenced by SyncImageProfiles().

static void WriteProfileShort ( const EndianType  endian,
const unsigned short  value,
unsigned char *  p 
)
static

Definition at line 1382 of file profile.c.

References CopyMagickMemory(), and LSBEndian.

Referenced by SyncImageProfiles().