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

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
 

Functions

static MagickBooleanType SetImageProfileInternal (Image *, const char *, const StringInfo *, const MagickBooleanType)
 
static void WriteTo8BimProfile (Image *, const char *, const StringInfo *)
 
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, const MagickBooleanType magick_unused(clone))
 
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 * ReadResourceLong (const unsigned char *p, unsigned int *quantum)
 
static const unsigned char * ReadResourceShort (const unsigned char *p, unsigned short *quantum)
 
static void WriteResourceLong (unsigned char *p, const unsigned int quantum)
 
static void GetProfilesFromResourceBlock (Image *image, const StringInfo *resource_block)
 
MagickExport MagickBooleanType SetImageProfile (Image *image, const char *name, const StringInfo *profile)
 
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 size_t ReadProfileMSBLong (unsigned char **p, size_t *length)
 
static unsigned short ReadProfileMSBShort (unsigned char **p, size_t *length)
 
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)
 
static MagickBooleanType Sync8BimProfile (Image *image, StringInfo *profile)
 
static MagickBooleanType SyncExifProfile (Image *image, StringInfo *profile)
 
MagickExport MagickBooleanType SyncImageProfiles (Image *image)
 

Macro Definition Documentation

#define cmsColorSpaceSignature   icColorSpaceSignature

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);
#define cmsOpenProfileFromMemTHR (   context,
  profile,
  length 
)    cmsOpenProfileFromMem(profile,length)

Referenced by ProfileImage().

#define cmsSetLogErrorHandler (   handler)    cmsSetErrorHandler(handler)

Referenced by ProfileImage().

#define cmsSigCmykData   icSigCmykData

Referenced by ProfileImage().

#define cmsSigGrayData   icSigGrayData

Referenced by ProfileImage().

#define cmsSigLabData   icSigLabData

Referenced by ProfileImage().

#define cmsSigLinkClass   icSigLinkClass

Referenced by ProfileImage().

#define cmsSigLuvData   icSigLuvData

Referenced by ProfileImage().

#define cmsSigRgbData   icSigRgbData

Referenced by ProfileImage().

#define cmsSigXYZData   icSigXYZData

Referenced by ProfileImage().

#define cmsSigYCbCrData   icSigYCbCrData

Referenced by ProfileImage().

#define cmsUInt32Number   DWORD
#define EXIF_DELIMITER   "\n"
#define EXIF_NUM_FORMATS   12

Referenced by SyncExifProfile().

#define MaxDirectoryStack   16

Referenced by SyncExifProfile().

#define ProfileImageTag   "Profile/Image"

Referenced by ProfileImage().

#define TAG_EXIF_OFFSET   0x8769

Referenced by SyncExifProfile().

#define TAG_INTEROP_OFFSET   0xa005

Referenced by SyncExifProfile().

#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); \
}
#define ThrowBinaryException(severity, tag, context)
Definition: exception-private.h:29

Referenced by ProfileImage().

Function Documentation

MagickExport void DestroyImageProfiles ( Image image)
static void* DestroyProfile ( void *  profile)
static

References DestroyStringInfo().

Referenced by SetImageProfileInternal().

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

References AbsoluteIntent, AcquireAuthenticCacheView(), AcquirePixelThreadSet(), AcquireStringInfo(), cmsColorSpaceSignature, cmsOpenProfileFromMemTHR, cmsSetLogErrorHandler, cmsSigCmykData, cmsSigGrayData, cmsSigLabData, cmsSigLinkClass, cmsSigLuvData, cmsSigRgbData, cmsSigXYZData, cmsSigYCbCrData, cmsUInt32Number, CMYKColorspace, ColorSeparationMatteType, ColorSeparationType, CompareStringInfo(), _Image::debug, DeleteImageProfile(), DestroyCacheView(), DestroyPixelThreadSet(), DestroyStringInfo(), DirectClass, _Image::exception, _Image::filename, GetCacheViewAuthenticIndexQueue(), GetCacheViewAuthenticPixels(), GetImageProfile(), GetImageProperty(), GetMagickModule, GetNextImageProfile(), GetOpenMPThreadId(), GetPixelBlue, GetPixelGreen, GetPixelIndex, GetPixelRed, GetStringInfoDatum(), GetStringInfoLength(), GRAYColorspace, GrayscaleMatteType, GrayscaleType, ImageError, IsGrayImage(), IsOptionMember(), IssRGBCompatibleColorspace(), LabColorspace, LocaleCompare(), LogMagickEvent(), magick_unreferenced, MagickFalse, MagickSignature, MagickTrue, MissingDelegateWarning, PerceptualIntent, ProfileImageTag, RelativeIntent, ResetImageProfileIterator(), ResourceLimitError, SaturationIntent, SetImageColorspace(), SetImageProfile(), SetImageProgress(), SetImageStorageClass(), SetPixelBlue, SetPixelGreen, SetPixelIndex, SetPixelRed, SetStringInfoDatum(), _Image::signature, sRGBColorspace, SyncCacheViewAuthenticPixels(), ThrowBinaryException, ThrowMagickException(), ThrowProfileException, TraceEvent, TrueColorMatteType, TrueColorType, UndefinedColorspace, XYZColorspace, YCbCrColorspace, and YUVColorspace.

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

Referenced by Sync8BimProfile(), and SyncExifProfile().

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

References LSBEndian.

Referenced by ReadProfileMSBLong(), and SyncExifProfile().

static size_t ReadProfileMSBLong ( unsigned char **  p,
size_t *  length 
)
inlinestatic

References MSBEndian, and ReadProfileLong().

Referenced by Sync8BimProfile().

static unsigned short ReadProfileMSBShort ( unsigned char **  p,
size_t *  length 
)
inlinestatic

References MSBEndian, and ReadProfileShort().

Referenced by Sync8BimProfile().

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

References LSBEndian.

Referenced by ReadProfileMSBShort(), and SyncExifProfile().

static const unsigned char* ReadResourceByte ( const unsigned char *  p,
unsigned char *  quantum 
)
inlinestatic
static const unsigned char* ReadResourceLong ( const unsigned char *  p,
unsigned int *  quantum 
)
inlinestatic
static const unsigned char* ReadResourceShort ( const unsigned char *  p,
unsigned short *  quantum 
)
inlinestatic
MagickExport MagickBooleanType SetImageProfile ( Image image,
const char *  name,
const StringInfo profile 
)
static void WriteProfileLong ( const EndianType  endian,
const size_t  value,
unsigned char *  p 
)
inlinestatic

References CopyMagickMemory(), and LSBEndian.

Referenced by Sync8BimProfile(), and SyncExifProfile().

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

References CopyMagickMemory(), and LSBEndian.

Referenced by Sync8BimProfile(), and SyncExifProfile().

static void WriteResourceLong ( unsigned char *  p,
const unsigned int  quantum 
)
inlinestatic

References CopyMagickMemory().

Referenced by WriteTo8BimProfile().