MagickCore  7.0.3
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 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

static MagickBooleanType SetImageProfileInternal (Image *, const char *, const StringInfo *, const MagickBooleanType, ExceptionInfo *)
 
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)
 
static MagickBooleanType SetsRGBImageProfile (Image *image, ExceptionInfo *exception)
 
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 * 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, 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 signed short ReadProfileShort (const EndianType endian, unsigned char *buffer)
 
static signed int ReadProfileLong (const EndianType endian, unsigned char *buffer)
 
static signed int ReadProfileMSBLong (unsigned char **p, size_t *length)
 
static signed 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)
 
MagickBooleanType SyncExifProfile (Image *image, StringInfo *profile)
 
MagickPrivate MagickBooleanType SyncImageProfiles (Image *image)
 

Macro Definition Documentation

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

Referenced by ProfileImage().

Typedef Documentation

Function Documentation

MagickExport void DestroyImageProfiles ( Image image)

Definition at line 218 of file profile.c.

References DestroySplayTree(), and _Image::profiles.

Referenced by CloneImageProfiles(), DestroyImage(), and StripImage().

static void* DestroyProfile ( void *  profile)
static

Definition at line 1343 of file profile.c.

References DestroyStringInfo().

Referenced by SetImageProfileInternal().

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

Definition at line 752 of file profile.c.

References AbsoluteIntent, AcquireAuthenticCacheView(), AcquirePixelThreadSet(), AcquireStringInfo(), _Image::alpha_trait, _Image::black_point_compensation, CMYKColorspace, ColorSeparationAlphaType, ColorSeparationType, _Image::colorspace, _Image::columns, CompareStringInfo(), _Image::debug, DeleteImageProfile(), DestroyCacheView(), DestroyPixelThreadSet(), DestroyStringInfo(), DirectClass, _CMSExceptionInfo::exception, _Image::filename, GetCacheViewAuthenticPixels(), GetImageProfile(), GetImageProperty(), GetMagickModule, GetNextImageProfile(), GetOpenMPThreadId(), GetPixelBlack(), GetPixelBlue(), GetPixelChannels(), GetPixelGreen(), GetPixelRed(), GetStringInfoDatum(), GetStringInfoLength(), GRAYColorspace, GrayscaleAlphaType, GrayscaleType, _CMSExceptionInfo::image, ImageError, IsOptionMember(), IssRGBCompatibleColorspace(), LabColorspace, LocaleCompare(), LogMagickEvent(), magick_restrict, MagickCoreSignature, MagickFalse, MagickTrue, MissingDelegateWarning, PerceptualIntent, ProfileImageTag, _Image::progress_monitor, RelativeIntent, _Image::rendering_intent, ResetImageProfileIterator(), ResourceLimitError, _Image::rows, SaturationIntent, SetImageColorspace(), SetImageGray(), SetImageProfile(), SetImageProgress(), SetImageStorageClass(), SetPixelBlack(), SetPixelBlue(), SetPixelGray(), SetPixelGreen(), SetPixelRed(), SetsRGBImageProfile(), SetStringInfoDatum(), _ProfileInfo::signature, _Image::signature, sRGBColorspace, SyncCacheViewAuthenticPixels(), ThrowBinaryException, ThrowMagickException(), ThrowProfileException, TraceEvent, TrueColorAlphaType, TrueColorType, _Image::type, UndefinedColorspace, UndefinedPixelTrait, XYZColorspace, YCbCrColorspace, and YUVColorspace.

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

Definition at line 1711 of file profile.c.

Referenced by Sync8BimProfile(), and SyncExifProfile().

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

Definition at line 1751 of file profile.c.

References LSBEndian.

Referenced by ReadProfileMSBLong(), and SyncExifProfile().

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

Definition at line 1783 of file profile.c.

References MSBEndian, and ReadProfileLong().

Referenced by Sync8BimProfile().

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

Definition at line 1796 of file profile.c.

References MSBEndian, and ReadProfileShort().

Referenced by Sync8BimProfile().

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

Definition at line 1723 of file profile.c.

References LSBEndian.

Referenced by ReadProfileMSBShort(), and SyncExifProfile().

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

Definition at line 1348 of file profile.c.

Referenced by GetProfilesFromResourceBlock(), and WriteTo8BimProfile().

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

Definition at line 1355 of file profile.c.

Referenced by GetProfilesFromResourceBlock(), and WriteTo8BimProfile().

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

Definition at line 1365 of file profile.c.

Referenced by GetProfilesFromResourceBlock(), and WriteTo8BimProfile().

MagickExport MagickBooleanType SetImageProfile ( Image image,
const char *  name,
const StringInfo profile,
ExceptionInfo exception 
)

Definition at line 1681 of file profile.c.

References MagickFalse, and SetImageProfileInternal().

Referenced by ProfileImage(), SetImageProperty(), and SetsRGBImageProfile().

static MagickBooleanType SetsRGBImageProfile ( Image image,
ExceptionInfo exception 
)
static
MagickPrivate MagickBooleanType SyncImageProfiles ( Image image)

Definition at line 2126 of file profile.c.

References GetImageProfile(), MagickFalse, MagickTrue, Sync8BimProfile(), and SyncExifProfile().

Referenced by WriteImage().

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

Definition at line 1810 of file profile.c.

References CopyMagickMemory(), and LSBEndian.

Referenced by Sync8BimProfile(), and SyncExifProfile().

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

Definition at line 1832 of file profile.c.

References CopyMagickMemory(), and LSBEndian.

Referenced by Sync8BimProfile(), and SyncExifProfile().

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

Definition at line 1373 of file profile.c.

References CopyMagickMemory().

Referenced by WriteTo8BimProfile().