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

Go to the source code of this file.

Macros

#define MaxDirectoryStack   16
 
#define EXIF_DELIMITER   "\n"
 
#define EXIF_NUM_FORMATS   12
 
#define EXIF_FMT_BYTE   1
 
#define EXIF_FMT_STRING   2
 
#define EXIF_FMT_USHORT   3
 
#define EXIF_FMT_ULONG   4
 
#define EXIF_FMT_URATIONAL   5
 
#define EXIF_FMT_SBYTE   6
 
#define EXIF_FMT_UNDEFINED   7
 
#define EXIF_FMT_SSHORT   8
 
#define EXIF_FMT_SLONG   9
 
#define EXIF_FMT_SRATIONAL   10
 
#define EXIF_FMT_SINGLE   11
 
#define EXIF_FMT_DOUBLE   12
 
#define TAG_EXIF_OFFSET   0x8769
 
#define TAG_GPS_OFFSET   0x8825
 
#define TAG_INTEROP_OFFSET   0xa005
 
#define EXIFMultipleValues(size, format, arg)
 
#define EXIFMultipleFractions(size, format, arg1, arg2)
 
#define WarnNoImageReturn(format, arg)
 
#define WarnNoImageInfoReturn(format, arg)
 
#define ExtendInterpretText(string_length)
 
#define AppendString2Text(string)
 
#define AppendKeyValue2Text(key, string)
 

Functions

MagickExport MagickBooleanType CloneImageProperties (Image *image, const Image *clone_image)
 
MagickExport MagickBooleanType DefineImageProperty (Image *image, const char *property, ExceptionInfo *exception)
 
MagickExport MagickBooleanType DeleteImageProperty (Image *image, const char *property)
 
MagickExport void DestroyImageProperties (Image *image)
 
MagickExport MagickBooleanType FormatImageProperty (Image *image, const char *property, const char *format,...)
 
static char * TracePSClippath (const unsigned char *, size_t, const size_t, const size_t)
 
static char * TraceSVGClippath (const unsigned char *, size_t, const size_t, const size_t)
 
static MagickBooleanType GetIPTCProperty (const Image *image, const char *key, ExceptionInfo *exception)
 
static ssize_t MagickMax (const ssize_t x, const ssize_t y)
 
static ssize_t MagickMin (const ssize_t x, const ssize_t y)
 
static int ReadPropertyByte (const unsigned char **p, size_t *length)
 
static size_t ReadPropertyMSBLong (const unsigned char **p, size_t *length)
 
static unsigned short ReadPropertyMSBShort (const unsigned char **p, size_t *length)
 
static MagickBooleanType Get8BIMProperty (const Image *image, const char *key, ExceptionInfo *exception)
 
static unsigned short ReadPropertyShort (const EndianType endian, const unsigned char *buffer)
 
static size_t ReadPropertyLong (const EndianType endian, const unsigned char *buffer)
 
static MagickBooleanType GetEXIFProperty (const Image *image, const char *property, ExceptionInfo *exception)
 
static MagickBooleanType GetXMPProperty (const Image *image, const char *property)
 
static char * TracePSClippath (const unsigned char *blob, size_t length, const size_t magick_unused(columns), const size_t magick_unused(rows))
 
MagickExport const char * GetImageProperty (const Image *image, const char *property, ExceptionInfo *exception)
 
static const char * GetMagickPropertyLetter (ImageInfo *image_info, Image *image, const char letter, ExceptionInfo *exception)
 
MagickExport const char * GetMagickProperty (ImageInfo *image_info, Image *image, const char *property, ExceptionInfo *exception)
 
MagickExport char * GetNextImageProperty (const Image *image)
 
MagickExport char * InterpretImageProperties (ImageInfo *image_info, Image *image, const char *embed_text, ExceptionInfo *exception)
 
MagickExport char * RemoveImageProperty (Image *image, const char *property)
 
MagickExport void ResetImagePropertyIterator (const Image *image)
 
MagickExport MagickBooleanType SetImageProperty (Image *image, const char *property, const char *value, ExceptionInfo *exception)
 

Macro Definition Documentation

#define AppendKeyValue2Text (   key,
  string 
)
Value:
do { \
size_t length=strlen(key)+strlen(string)+2; \
if ((size_t) (q-interpret_text+length+1) >= extent) \
{ extent+=length; \
interpret_text=(char *) ResizeQuantumMemory(interpret_text, \
extent+MaxTextExtent,sizeof(*interpret_text)); \
if (interpret_text == (char *) NULL) \
return((char *)NULL); \
q=interpret_text+strlen(interpret_text); \
} \
q+=FormatLocaleString(q,extent,"%s=%s\n",(key),(string)); \
} while (0) /* no trailing ; */

Definition at line 3025 of file property.c.

Referenced by InterpretImageProperties().

#define AppendString2Text (   string)
Value:
do { \
size_t length=strlen((string)); \
if ((size_t) (q-interpret_text+length+1) >= extent) \
{ extent+=length; \
interpret_text=(char *) ResizeQuantumMemory(interpret_text, \
extent+MaxTextExtent,sizeof(*interpret_text)); \
if (interpret_text == (char *) NULL) \
return((char *)NULL); \
q=interpret_text+strlen(interpret_text); \
} \
(void) CopyMagickString(q,(string),extent); \
q+=length; \
} while (0) /* no trailing ; */

Definition at line 3010 of file property.c.

Referenced by InterpretImageProperties().

#define EXIF_DELIMITER   "\n"
#define EXIF_FMT_BYTE   1

Referenced by GetEXIFProperty().

#define EXIF_FMT_DOUBLE   12

Referenced by GetEXIFProperty().

#define EXIF_FMT_SBYTE   6

Referenced by GetEXIFProperty().

#define EXIF_FMT_SINGLE   11

Referenced by GetEXIFProperty().

#define EXIF_FMT_SLONG   9

Referenced by GetEXIFProperty().

#define EXIF_FMT_SRATIONAL   10

Referenced by GetEXIFProperty().

#define EXIF_FMT_SSHORT   8

Referenced by GetEXIFProperty().

#define EXIF_FMT_STRING   2

Referenced by GetEXIFProperty().

#define EXIF_FMT_ULONG   4

Referenced by GetEXIFProperty().

#define EXIF_FMT_UNDEFINED   7

Referenced by GetEXIFProperty().

#define EXIF_FMT_URATIONAL   5

Referenced by GetEXIFProperty().

#define EXIF_FMT_USHORT   3

Referenced by GetEXIFProperty().

#define EXIF_NUM_FORMATS   12
#define EXIFMultipleFractions (   size,
  format,
  arg1,
  arg2 
)
Value:
{ \
ssize_t \
component; \
\
size_t \
length; \
\
unsigned char \
*p1; \
\
length=0; \
p1=p; \
for (component=0; component < components; component++) \
{ \
length+=FormatLocaleString(buffer+length,MaxTextExtent-length, \
format", ",(arg1),(arg2)); \
if (length >= (MaxTextExtent-1)) \
length=MaxTextExtent-1; \
p1+=size; \
} \
if (length > 1) \
buffer[length-2]='\0'; \
value=AcquireString(buffer); \
}

Referenced by GetEXIFProperty().

#define EXIFMultipleValues (   size,
  format,
  arg 
)
Value:
{ \
ssize_t \
component; \
\
size_t \
length; \
\
unsigned char \
*p1; \
\
length=0; \
p1=p; \
for (component=0; component < components; component++) \
{ \
length+=FormatLocaleString(buffer+length,MaxTextExtent-length, \
format", ",arg); \
if (length >= (MaxTextExtent-1)) \
length=MaxTextExtent-1; \
p1+=size; \
} \
if (length > 1) \
buffer[length-2]='\0'; \
value=AcquireString(buffer); \
}

Referenced by GetEXIFProperty().

#define ExtendInterpretText (   string_length)
Value:
do { \
size_t length=(string_length); \
if ((size_t) (q-interpret_text+length+1) >= extent) \
{ extent+=length; \
interpret_text=(char *) ResizeQuantumMemory(interpret_text, \
extent+MaxTextExtent,sizeof(*interpret_text)); \
if (interpret_text == (char *) NULL) \
return((char *)NULL); \
q=interpret_text+strlen(interpret_text); \
} } while (0) /* no trailing ; */

Definition at line 2998 of file property.c.

Referenced by InterpretImageProperties().

#define MaxDirectoryStack   16
#define TAG_EXIF_OFFSET   0x8769
#define TAG_GPS_OFFSET   0x8825

Referenced by GetEXIFProperty().

#define TAG_INTEROP_OFFSET   0xa005
#define WarnNoImageInfoReturn (   format,
  arg 
)
Value:
if (image == (Image *) NULL ) { \
"NoImageInfoForProperty",format,arg); \
return((const char *)NULL); \
}

Definition at line 2136 of file property.c.

Referenced by GetMagickProperty(), and GetMagickPropertyLetter().

#define WarnNoImageReturn (   format,
  arg 
)
Value:
if (image == (Image *) NULL ) { \
"NoImageForProperty",format,arg); \
return((const char *)NULL); \
}

Definition at line 2130 of file property.c.

Referenced by GetMagickProperty(), and GetMagickPropertyLetter().

Function Documentation

MagickExport MagickBooleanType DefineImageProperty ( Image image,
const char *  property,
ExceptionInfo exception 
)

Definition at line 209 of file property.c.

References CopyMagickString(), MaxTextExtent, and SetImageProperty().

MagickExport MagickBooleanType FormatImageProperty ( Image image,
const char *  property,
const char *  format,
  ... 
)
static MagickBooleanType GetIPTCProperty ( const Image image,
const char *  key,
ExceptionInfo exception 
)
static
static const char* GetMagickPropertyLetter ( ImageInfo image_info,
Image image,
const char  letter,
ExceptionInfo exception 
)
static
MagickExport char* InterpretImageProperties ( ImageInfo image_info,
Image image,
const char *  embed_text,
ExceptionInfo exception 
)
static ssize_t MagickMax ( const ssize_t  x,
const ssize_t  y 
)
inlinestatic

Definition at line 469 of file property.c.

Referenced by Get8BIMProperty().

static ssize_t MagickMin ( const ssize_t  x,
const ssize_t  y 
)
inlinestatic

Definition at line 476 of file property.c.

Referenced by Get8BIMProperty(), TracePSClippath(), and TraceSVGClippath().

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

Definition at line 483 of file property.c.

Referenced by Get8BIMProperty(), and GetEXIFProperty().

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

Definition at line 718 of file property.c.

References LSBEndian.

Referenced by GetEXIFProperty().

static size_t ReadPropertyMSBLong ( const unsigned char **  p,
size_t *  length 
)
inlinestatic

Definition at line 495 of file property.c.

Referenced by Get8BIMProperty(), TracePSClippath(), and TraceSVGClippath().

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

Definition at line 525 of file property.c.

Referenced by Get8BIMProperty(), TracePSClippath(), and TraceSVGClippath().

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

Definition at line 702 of file property.c.

References LSBEndian.

Referenced by GetEXIFProperty().

MagickExport char* RemoveImageProperty ( Image image,
const char *  property 
)
MagickExport MagickBooleanType SetImageProperty ( Image image,
const char *  property,
const char *  value,
ExceptionInfo exception 
)

Definition at line 3608 of file property.c.

References AcquireImageInfo(), AddValueToSplayTree(), AllCompliance, _Image::background_color, _ChromaticityInfo::blue_primary, _Image::chromaticity, _Image::colorspace, CompareSplayTreeString(), _Image::compose, _Image::compression, ConstantString(), CopyMagickString(), _Image::debug, _Image::delay, DeleteImageProperty(), _Image::depth, DestroyImageInfo(), DestroyString(), _Image::dispose, _Image::filename, _ImageInfo::filename, FileToStringInfo(), _Image::gamma, GetMagickModule, GetPageGeometry(), _Image::gravity, GreaterValue, _ChromaticityInfo::green_primary, IfMagickTrue, _Image::intensity, _Image::interpolate, IssRGBColorspace(), _Image::iterations, LessValue, LocaleCompare(), LocaleNCompare(), LogMagickEvent(), _ImageInfo::magick, MagickColorspaceOptions, MagickComposeOptions, MagickCompressOptions, MagickDisposeOptions, MagickFalse, MagickGravityOptions, MagickIntentOptions, MagickInterpolateOptions, MagickResolutionOptions, MagickSignature, MagickTrue, MaxTextExtent, NewSplayTree(), OptionError, _Image::page, ParseAbsoluteGeometry(), ParseCommandOption(), ParseGeometry(), PerceptualIntent, _Image::properties, QueryColorCompliance(), _ChromaticityInfo::red_primary, RelinquishMagickMemory(), _Image::rendering_intent, ResetMagickMemory(), _Image::resolution, _GeometryInfo::rho, SetImageInfo(), SetImageProfile(), _GeometryInfo::sigma, SigmaValue, _Image::signature, StringToDouble(), StringToUnsignedLong(), ThrowMagickException(), _Image::ticks_per_second, _Image::tile_offset, TraceEvent, UndefinedIntent, _Image::units, _ChromaticityInfo::white_point, _PrimaryInfo::x, _PointInfo::x, _PrimaryInfo::y, _PointInfo::y, and _PrimaryInfo::z.

Referenced by DefineImageProperty(), FormatImageProperty(), Get8BIMProperty(), GetEXIFProperty(), GetIPTCProperty(), PreviewImage(), ReadImage(), SignatureImage(), and ThumbnailImage().

static char* TracePSClippath ( const unsigned char *  ,
size_t  ,
const size_t  ,
const size_t   
)
static

Referenced by Get8BIMProperty().

static char* TracePSClippath ( const unsigned char *  blob,
size_t  length,
const size_t   magick_unusedcolumns,
const size_t   magick_unusedrows 
)
static
static char * TraceSVGClippath ( const unsigned char *  blob,
size_t  length,
const size_t  columns,
const size_t  rows 
)