Defines | Functions

profile.c File Reference

#include "magick/studio.h"
#include "magick/cache.h"
#include "magick/color.h"
#include "magick/configure.h"
#include "magick/exception.h"
#include "magick/exception-private.h"
#include "magick/hashmap.h"
#include "magick/image.h"
#include "magick/memory_.h"
#include "magick/monitor.h"
#include "magick/monitor-private.h"
#include "magick/option.h"
#include "magick/profile.h"
#include "magick/property.h"
#include "magick/quantum.h"
#include "magick/quantum-private.h"
#include "magick/splay-tree.h"
#include "magick/string_.h"
#include "magick/thread-private.h"
#include "magick/token.h"
#include "magick/utility.h"
Include dependency graph for profile.c:

Go to the source code of this file.

Defines

#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

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)
static MagickBooleanType SetAdobeRGB1998ImageProfile (Image *image)
static MagickBooleanType SetsRGBImageProfile (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 * 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)
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 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)
MagickExport MagickBooleanType SyncImageProfiles (Image *image)

Define Documentation

#define cmsColorSpaceSignature   icColorSpaceSignature

Definition at line 89 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 93 of file profile.c.

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

Definition at line 95 of file profile.c.

Referenced by ProfileImage().

#define cmsSetLogErrorHandler (   handler  )     cmsSetErrorHandler(handler)

Definition at line 91 of file profile.c.

Referenced by ProfileImage().

#define cmsSigCmykData   icSigCmykData

Definition at line 81 of file profile.c.

Referenced by ProfileImage().

#define cmsSigGrayData   icSigGrayData

Definition at line 82 of file profile.c.

Referenced by ProfileImage().

#define cmsSigLabData   icSigLabData

Definition at line 83 of file profile.c.

Referenced by ProfileImage().

#define cmsSigLinkClass   icSigLinkClass

Definition at line 88 of file profile.c.

Referenced by ProfileImage().

#define cmsSigLuvData   icSigLuvData

Definition at line 84 of file profile.c.

Referenced by ProfileImage().

#define cmsSigRgbData   icSigRgbData

Definition at line 85 of file profile.c.

Referenced by ProfileImage().

#define cmsSigXYZData   icSigXYZData

Definition at line 86 of file profile.c.

Referenced by ProfileImage().

#define cmsSigYCbCrData   icSigYCbCrData

Definition at line 87 of file profile.c.

Referenced by ProfileImage().

#define cmsUInt32Number   DWORD

Definition at line 90 of file profile.c.

Referenced by IdentifyImage(), and ProfileImage().

#define EXIF_DELIMITER   "\n"
#define EXIF_NUM_FORMATS   12
#define MaxDirectoryStack   16
#define ProfileImageTag   "Profile/Image"

Referenced by ProfileImage().

#define TAG_EXIF_OFFSET   0x8769
#define TAG_INTEROP_OFFSET   0xa005

Referenced by GetEXIFProperty().

#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().


Function Documentation

MagickExport MagickBooleanType CloneImageProfiles ( Image image,
const Image clone_image 
)
MagickExport MagickBooleanType DeleteImageProfile ( Image image,
const char *  name 
)
MagickExport void DestroyImageProfiles ( Image image  ) 

Definition at line 216 of file profile.c.

References DestroySplayTree(), and _Image::profiles.

Referenced by DestroyImage(), and StripImage().

static void* DestroyProfile ( void *  profile  )  [static]

Definition at line 1472 of file profile.c.

References DestroyStringInfo().

Referenced by SetImageProfile().

MagickExport const StringInfo* GetImageProfile ( const Image image,
const char *  name 
)
MagickExport char* GetNextImageProfile ( const Image image  ) 
static MagickBooleanType GetProfilesFromResourceBlock ( Image image,
const StringInfo resource_block 
) [static]
MagickExport MagickBooleanType ProfileImage ( Image image,
const char *  name,
const void *  datum,
const size_t  length,
const MagickBooleanType   magick_unusedclone 
)

Definition at line 838 of file profile.c.

References AbsoluteIntent, AcquireCacheView(), AcquirePixelThreadSet(), AcquireStringInfo(), _Image::black_point_compensation, cmsColorSpaceSignature, cmsOpenProfileFromMemTHR, cmsSetLogErrorHandler, cmsSigCmykData, cmsSigGrayData, cmsSigLabData, cmsSigLinkClass, cmsSigLuvData, cmsSigRgbData, cmsSigXYZData, cmsSigYCbCrData, cmsUInt32Number, CMYKColorspace, ColorSeparationType, _Image::colorspace, _Image::columns, CompareStringInfo(), ConstantString(), _Image::debug, DeleteImageProfile(), DestroyCacheView(), DestroyPixelThreadSet(), DestroyString(), DestroyStringInfo(), DirectClass, _Image::exception, _Image::filename, GetCacheViewAuthenticIndexQueue(), GetCacheViewAuthenticPixels(), GetImageProfile(), GetImageProperty(), GetMagickModule, GetNextImageProfile(), GetOpenMPThreadId(), GetStringInfoDatum(), GetStringInfoLength(), GlobExpression(), GRAYColorspace, GrayscaleType, ImageError, IsGrayImage(), LabColorspace, LocaleCompare(), LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, _Image::matte, PerceptualIntent, ProfileImageTag, _Image::progress_monitor, RelativeIntent, RelinquishMagickMemory(), _Image::rendering_intent, ResetImageProfileIterator(), ResourceLimitError, restrict, RGBColorspace, _Image::rows, SaturationIntent, SetAdobeRGB1998ImageProfile(), SetImageColorspace(), SetImageProfile(), SetImageProgress(), SetImageStorageClass(), SetsRGBImageProfile(), SetStringInfoDatum(), _Image::signature, StringToArgv(), SubstituteString(), SyncCacheViewAuthenticPixels(), ThrowBinaryException, ThrowMagickException(), ThrowProfileException, TraceEvent, TrueColorType, _Image::type, UndefinedColorspace, XYZColorspace, and YCbCrColorspace.

static int ReadProfileByte ( unsigned char **  p,
size_t *  length 
) [inline, static]

Definition at line 1723 of file profile.c.

Referenced by SyncImageProfiles().

static size_t ReadProfileLong ( const EndianType  endian,
unsigned char *  buffer 
) [inline, static]

Definition at line 1751 of file profile.c.

References MSBEndian.

Referenced by SyncImageProfiles().

static unsigned short ReadProfileShort ( const EndianType  endian,
unsigned char *  buffer 
) [inline, static]

Definition at line 1735 of file profile.c.

References MSBEndian.

Referenced by SyncImageProfiles().

static const unsigned char* ReadResourceByte ( const unsigned char *  p,
unsigned char *  quantum 
) [inline, static]

Definition at line 1477 of file profile.c.

Referenced by GetProfilesFromResourceBlock().

static const unsigned char* ReadResourceBytes ( const unsigned char *  p,
const ssize_t  count,
unsigned char *  quantum 
) [inline, static]

Definition at line 1484 of file profile.c.

static const unsigned char* ReadResourceLong ( const unsigned char *  p,
size_t *  quantum 
) [inline, static]

Definition at line 1495 of file profile.c.

Referenced by GetProfilesFromResourceBlock().

static const unsigned char* ReadResourceShort ( const unsigned char *  p,
unsigned short *  quantum 
) [inline, static]

Definition at line 1505 of file profile.c.

Referenced by GetProfilesFromResourceBlock().

MagickExport StringInfo* RemoveImageProfile ( Image image,
const char *  name 
)
MagickExport void ResetImageProfileIterator ( const Image image  ) 
static MagickBooleanType SetAdobeRGB1998ImageProfile ( Image image  )  [static]
MagickExport MagickBooleanType SetImageProfile ( Image image,
const char *  name,
const StringInfo profile 
)
static MagickBooleanType SetsRGBImageProfile ( Image image  )  [static]
MagickExport MagickBooleanType SyncImageProfiles ( Image image  ) 
static void WriteProfileLong ( const EndianType  endian,
const size_t  value,
unsigned char *  p 
) [inline, static]

Definition at line 1768 of file profile.c.

References CopyMagickMemory(), and MSBEndian.

Referenced by SyncImageProfiles().

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

Definition at line 1790 of file profile.c.

References CopyMagickMemory(), and MSBEndian.

Referenced by SyncImageProfiles().