MagickCore  6.9.10
Convert, Edit, Or Compose Bitmap Images
profile.c File Reference
Include dependency graph for profile.c:

Macros

#define LCMSHDRI
 
#define LCMSScaleSource(pixel)   (source_scale*QuantumScale*(pixel))
 
#define LCMSScaleTarget(pixel)   ClampToQuantum(target_scale*QuantumRange*(pixel))
 
#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 double LCMSType
 

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)
 
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 * 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 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)
 
static MagickBooleanType SyncExifProfile (Image *image, StringInfo *profile)
 
MagickExport MagickBooleanType SyncImageProfiles (Image *image)
 

Macro Definition Documentation

◆ EXIF_DELIMITER

#define EXIF_DELIMITER   "\n"

◆ EXIF_NUM_FORMATS

#define EXIF_NUM_FORMATS   12

Referenced by SyncExifProfile().

◆ LCMSHDRI

#define LCMSHDRI

◆ LCMSScaleSource

#define LCMSScaleSource (   pixel)    (source_scale*QuantumScale*(pixel))

Referenced by ProfileImage().

◆ LCMSScaleTarget

#define LCMSScaleTarget (   pixel)    ClampToQuantum(target_scale*QuantumRange*(pixel))

Referenced by ProfileImage().

◆ MaxDirectoryStack

#define MaxDirectoryStack   16

Referenced by SyncExifProfile().

◆ ProfileImageTag

#define ProfileImageTag   "Profile/Image"

Referenced by ProfileImage().

◆ TAG_EXIF_OFFSET

#define TAG_EXIF_OFFSET   0x8769

Referenced by SyncExifProfile().

◆ TAG_INTEROP_OFFSET

#define TAG_INTEROP_OFFSET   0xa005

Referenced by SyncExifProfile().

◆ ThrowProfileException

#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

◆ LCMSType

typedef double LCMSType

Function Documentation

◆ CloneImageProfiles()

◆ DeleteImageProfile()

◆ DestroyImageProfiles()

MagickExport void DestroyImageProfiles ( Image image)

◆ DestroyProfile()

static void* DestroyProfile ( void *  profile)
static

References DestroyStringInfo().

Referenced by SetImageProfileInternal().

◆ GetImageProfile()

◆ GetNextImageProfile()

◆ GetProfilesFromResourceBlock()

◆ ProfileImage()

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

◆ ReadProfileByte()

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

Referenced by Sync8BimProfile(), and SyncExifProfile().

◆ ReadProfileLong()

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

◆ ReadProfileMSBLong()

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

◆ ReadProfileMSBShort()

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

◆ ReadProfileShort()

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

◆ ReadResourceByte()

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

◆ ReadResourceLong()

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

◆ ReadResourceShort()

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

◆ RemoveImageProfile()

◆ ResetImageProfileIterator()

◆ SetImageProfile()

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

◆ SetImageProfileInternal()

◆ SetsRGBImageProfile()

◆ Sync8BimProfile()

◆ SyncExifProfile()

◆ SyncImageProfiles()

◆ WriteProfileLong()

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

References LSBEndian.

Referenced by Sync8BimProfile(), and SyncExifProfile().

◆ WriteProfileShort()

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

References LSBEndian.

Referenced by Sync8BimProfile(), and SyncExifProfile().

◆ WriteResourceLong()

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

Referenced by WriteTo8BimProfile().

◆ WriteTo8BimProfile()