MagickCore 7.1.0
Convert, Edit, Or Compose Bitmap Images
|
#include "MagickCore/studio.h"
#include "MagickCore/artifact.h"
#include "MagickCore/attribute.h"
#include "MagickCore/cache.h"
#include "MagickCore/color.h"
#include "MagickCore/colorspace-private.h"
#include "MagickCore/configure.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/image.h"
#include "MagickCore/linked-list.h"
#include "MagickCore/memory_.h"
#include "MagickCore/monitor.h"
#include "MagickCore/monitor-private.h"
#include "MagickCore/option.h"
#include "MagickCore/option-private.h"
#include "MagickCore/pixel-accessor.h"
#include "MagickCore/profile.h"
#include "MagickCore/profile-private.h"
#include "MagickCore/property.h"
#include "MagickCore/quantum.h"
#include "MagickCore/quantum-private.h"
#include "MagickCore/resource_.h"
#include "MagickCore/splay-tree.h"
#include "MagickCore/string_.h"
#include "MagickCore/string-private.h"
#include "MagickCore/thread-private.h"
#include "MagickCore/token.h"
#include "MagickCore/utility.h"
Go to the source code of this file.
Data Structures | |
struct | _ProfileInfo |
struct | _CMSExceptionInfo |
Macros | |
#define | ProfileImageTag "Profile/Image" |
#define | TYPE_XYZ_8 (COLORSPACE_SH(PT_XYZ)|CHANNELS_SH(3)|BYTES_SH(1)) |
#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 StringInfo * | GetImageProfile (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 StringInfo * | RemoveImageProfile (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) |
static void | PatchCorruptProfile (const char *name, StringInfo *profile) |
static MagickBooleanType | ValidateXMPProfile (Image *image, const StringInfo *profile, 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 | SyncExifProfile (const Image *image, unsigned char *exif, size_t length) |
static MagickBooleanType | Sync8BimProfile (const Image *image, const StringInfo *profile) |
MagickPrivate MagickBooleanType | SyncImageProfiles (Image *image) |
static void | UpdateClipPath (unsigned char *blob, size_t length, const size_t old_columns, const size_t old_rows, const RectangleInfo *new_geometry) |
MagickPrivate void | Update8BIMClipPath (const Image *image, const size_t old_columns, const size_t old_rows, const RectangleInfo *new_geometry) |
#define EXIF_DELIMITER "\n" |
#define EXIF_NUM_FORMATS 12 |
#define MaxDirectoryStack 16 |
#define ProfileImageTag "Profile/Image" |
#define TAG_EXIF_OFFSET 0x8769 |
#define TAG_INTEROP_OFFSET 0xa005 |
#define ThrowProfileException | ( | severity, | |
tag, | |||
context | |||
) |
#define TYPE_XYZ_8 (COLORSPACE_SH(PT_XYZ)|CHANNELS_SH(3)|BYTES_SH(1)) |
typedef struct _CMSExceptionInfo CMSExceptionInfo |
MagickExport MagickBooleanType CloneImageProfiles | ( | Image * | image, |
const Image * | clone_image | ||
) |
Definition at line 152 of file profile.c.
References CloneSplayTree(), CloneStringInfo(), ConstantString(), DestroyImageProfiles(), _Image::filename, GetMagickModule, IsEventLogging(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickTrue, _Image::profiles, _Image::signature, and TraceEvent.
Referenced by CloneImage(), CoalesceImages(), and DisposeImages().
MagickExport MagickBooleanType DeleteImageProfile | ( | Image * | image, |
const char * | name | ||
) |
Definition at line 195 of file profile.c.
References DeleteNodeFromSplayTree(), _Image::filename, GetMagickModule, IsEventLogging(), LogMagickEvent(), MagickCoreSignature, MagickFalse, _Image::profiles, _Image::signature, TraceEvent, and WriteTo8BimProfile().
Referenced by ProfileImage(), ThumbnailImage(), and TransformImageColorspace().
MagickExport void DestroyImageProfiles | ( | Image * | image | ) |
Definition at line 229 of file profile.c.
References DestroySplayTree(), and _Image::profiles.
Referenced by CloneImageProfiles(), DestroyImage(), and StripImage().
|
static |
Definition at line 1560 of file profile.c.
References DestroyStringInfo().
Referenced by SetImageProfileInternal().
MagickExport const StringInfo * GetImageProfile | ( | const Image * | image, |
const char * | name | ||
) |
Definition at line 259 of file profile.c.
References _Image::filename, GetMagickModule, GetValueFromSplayTree(), IsEventLogging(), LogMagickEvent(), MagickCoreSignature, MagickFalse, _Image::profiles, _Image::signature, and TraceEvent.
Referenced by Get8BIMProperty(), GetEXIFProperty(), GetICCProperty(), GetIPTCProperty(), GetMagickProperty(), GetXMPProperty(), IdentifyImage(), ProfileImage(), ReadImage(), SetsRGBImageProfile(), SyncImageProfiles(), and Update8BIMClipPath().
MagickExport char * GetNextImageProfile | ( | const Image * | image | ) |
Definition at line 298 of file profile.c.
References _Image::filename, GetMagickModule, GetNextKeyInSplayTree(), IsEventLogging(), LogMagickEvent(), MagickCoreSignature, MagickFalse, _Image::profiles, _Image::signature, and TraceEvent.
Referenced by GetMagickProperty(), IdentifyImage(), ProfileImage(), and ThumbnailImage().
|
static |
Definition at line 1712 of file profile.c.
References AcquireStringInfo(), DestroyStringInfo(), GetStringInfoDatum(), GetStringInfoLength(), LocaleNCompare(), MagickTrue, PixelsPerCentimeterResolution, PixelsPerInchResolution, ReadResourceByte(), ReadResourceLong(), ReadResourceShort(), _Image::resolution, SetImageProfileInternal(), SetStringInfoDatum(), _Image::units, _PointInfo::x, and _PointInfo::y.
Referenced by SetImageProfileInternal().
|
static |
Definition at line 1861 of file profile.c.
References AcquireStringInfo(), ConcatenateStringInfo(), DestroyStringInfo(), GetStringInfoDatum(), GetStringInfoLength(), LocaleCompare(), LocaleNCompare(), SetStringInfo(), SetStringInfoDatum(), and SetStringInfoLength().
Referenced by SetImageProfileInternal().
MagickExport MagickBooleanType ProfileImage | ( | Image * | image, |
const char * | name, | ||
const void * | datum, | ||
const size_t | length, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 933 of file profile.c.
References AbsoluteIntent, AcquireAuthenticCacheView(), AcquirePixelTLS(), AcquireStringInfo(), _Image::alpha_trait, _Image::black_point_compensation, CMYKColorspace, ColorSeparationAlphaType, ColorSeparationType, _Image::colorspace, _Image::columns, CompareStringInfo(), DeleteImageProfile(), DestroyCacheView(), DestroyPixelTLS(), DestroyStringInfo(), DirectClass, _CMSExceptionInfo::exception, _Image::filename, GetCacheViewAuthenticPixels(), GetImageArtifact(), GetImageProfile(), GetImageProperty(), GetMagickModule, GetNextImageProfile(), GetOpenMPThreadId(), GetStringInfoDatum(), GetStringInfoLength(), GRAYColorspace, GrayscaleAlphaType, GrayscaleType, _CMSExceptionInfo::image, ImageError, IsEventLogging(), IsOptionMember(), IsStringFalse(), LabColorspace, LocaleCompare(), LogMagickEvent(), magick_restrict, MagickCoreSignature, MagickFalse, MagickTrue, MissingDelegateWarning, PerceptualIntent, ProfileImageTag, _Image::progress_monitor, RelativeIntent, _Image::rendering_intent, ResetImageProfileIterator(), ResourceLimitError, _Image::rows, SaturationIntent, SetImageColorspace(), SetImageProfile(), SetImageProgress(), SetImageStorageClass(), SetsRGBImageProfile(), SetStringInfoDatum(), _Image::signature, sRGBColorspace, SyncCacheViewAuthenticPixels(), ThrowBinaryException, ThrowMagickException(), ThrowProfileException, TraceEvent, TrueColorAlphaType, TrueColorType, _Image::type, TYPE_XYZ_8, UndefinedPixelTrait, and XYZColorspace.
|
inlinestatic |
Definition at line 2025 of file profile.c.
Referenced by Sync8BimProfile(), SyncExifProfile(), and Update8BIMClipPath().
|
inlinestatic |
Definition at line 2065 of file profile.c.
References LSBEndian.
Referenced by ReadProfileMSBLong(), and SyncExifProfile().
|
inlinestatic |
Definition at line 2097 of file profile.c.
References MSBEndian, and ReadProfileLong().
Referenced by Sync8BimProfile(), Update8BIMClipPath(), and UpdateClipPath().
|
inlinestatic |
Definition at line 2110 of file profile.c.
References MSBEndian, and ReadProfileShort().
Referenced by Sync8BimProfile(), Update8BIMClipPath(), and UpdateClipPath().
|
inlinestatic |
Definition at line 2037 of file profile.c.
References LSBEndian.
Referenced by ReadProfileMSBShort(), and SyncExifProfile().
|
inlinestatic |
Definition at line 1565 of file profile.c.
Referenced by GetProfilesFromResourceBlock(), and WriteTo8BimProfile().
|
inlinestatic |
Definition at line 1572 of file profile.c.
Referenced by GetProfilesFromResourceBlock(), and WriteTo8BimProfile().
|
inlinestatic |
Definition at line 1582 of file profile.c.
Referenced by GetProfilesFromResourceBlock(), and WriteTo8BimProfile().
MagickExport StringInfo * RemoveImageProfile | ( | Image * | image, |
const char * | name | ||
) |
Definition at line 1477 of file profile.c.
References _Image::filename, GetMagickModule, IsEventLogging(), LogMagickEvent(), MagickCoreSignature, MagickFalse, _Image::profiles, RemoveNodeFromSplayTree(), _Image::signature, TraceEvent, and WriteTo8BimProfile().
MagickExport void ResetImageProfileIterator | ( | const Image * | image | ) |
Definition at line 1518 of file profile.c.
References _Image::filename, GetMagickModule, IsEventLogging(), LogMagickEvent(), MagickCoreSignature, MagickFalse, _Image::profiles, ResetSplayTreeIterator(), _Image::signature, and TraceEvent.
Referenced by GetMagickProperty(), IdentifyImage(), ProfileImage(), and ThumbnailImage().
MagickExport MagickBooleanType SetImageProfile | ( | Image * | image, |
const char * | name, | ||
const StringInfo * | profile, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 1995 of file profile.c.
References MagickFalse, and SetImageProfileInternal().
Referenced by ProfileImage(), SetImageProperty(), and SetsRGBImageProfile().
|
static |
Definition at line 1952 of file profile.c.
References AddValueToSplayTree(), CloneStringInfo(), CompareSplayTreeString(), ConstantString(), CopyMagickString(), DestroyProfile(), DestroyStringInfo(), _Image::filename, GetMagickModule, GetProfilesFromResourceBlock(), IsEventLogging(), LocaleCompare(), LocaleLower(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickPathExtent, MagickTrue, NewSplayTree(), PatchCorruptProfile(), _Image::profiles, RelinquishMagickMemory(), _Image::signature, TraceEvent, ValidateXMPProfile(), and WriteTo8BimProfile().
Referenced by GetProfilesFromResourceBlock(), and SetImageProfile().
|
static |
Definition at line 640 of file profile.c.
References AcquireStringInfo(), DestroyStringInfo(), GetImageProfile(), MagickCoreSignature, MagickFalse, SetImageProfile(), SetStringInfoDatum(), and _Image::signature.
Referenced by ProfileImage().
|
static |
Definition at line 2384 of file profile.c.
References CastDoubleToLong(), GetStringInfoDatum(), GetStringInfoLength(), MagickFalse, MagickTrue, MSBEndian, PixelsPerCentimeterResolution, ReadProfileByte(), ReadProfileMSBLong(), ReadProfileMSBShort(), _Image::resolution, SyncExifProfile(), _Image::units, WriteProfileLong(), WriteProfileShort(), _PointInfo::x, and _PointInfo::y.
Referenced by SyncImageProfiles().
|
static |
Definition at line 2164 of file profile.c.
References AddValueToSplayTree(), DestroySplayTree(), EXIF_NUM_FORMATS, GetValueFromSplayTree(), LSBEndian, MagickFalse, MagickTrue, MaxDirectoryStack, MSBEndian, NewSplayTree(), _Image::orientation, ReadProfileByte(), ReadProfileLong(), ReadProfileShort(), _Image::resolution, TAG_EXIF_OFFSET, TAG_INTEROP_OFFSET, _Image::units, WriteProfileLong(), WriteProfileShort(), _PointInfo::x, and _PointInfo::y.
Referenced by Sync8BimProfile(), and SyncImageProfiles().
MagickPrivate MagickBooleanType SyncImageProfiles | ( | Image * | image | ) |
Definition at line 2449 of file profile.c.
References GetImageProfile(), GetStringInfoDatum(), GetStringInfoLength(), MagickFalse, MagickTrue, Sync8BimProfile(), and SyncExifProfile().
Referenced by WriteImage().
MagickPrivate void Update8BIMClipPath | ( | const Image * | image, |
const size_t | old_columns, | ||
const size_t | old_rows, | ||
const RectangleInfo * | new_geometry | ||
) |
Definition at line 2558 of file profile.c.
References GetImageProfile(), GetStringInfoDatum(), GetStringInfoLength(), MagickMin, ReadProfileByte(), ReadProfileMSBLong(), ReadProfileMSBShort(), and UpdateClipPath().
Referenced by ExtentImage(), and TrimImage().
|
static |
Definition at line 2470 of file profile.c.
References _RectangleInfo::height, MagickMin, MSBEndian, ReadProfileMSBLong(), ReadProfileMSBShort(), _RectangleInfo::width, WriteProfileLong(), _RectangleInfo::x, and _RectangleInfo::y.
Referenced by Update8BIMClipPath().
|
static |
Definition at line 1942 of file profile.c.
References _Image::filename, GetMagickModule, MagickFalse, MissingDelegateWarning, and ThrowMagickException().
Referenced by SetImageProfileInternal().
|
inlinestatic |
Definition at line 2124 of file profile.c.
References LSBEndian.
Referenced by Sync8BimProfile(), SyncExifProfile(), and UpdateClipPath().
|
static |
Definition at line 2146 of file profile.c.
References LSBEndian.
Referenced by Sync8BimProfile(), and SyncExifProfile().
|
inlinestatic |
Definition at line 1590 of file profile.c.
Referenced by WriteTo8BimProfile().
|
static |
Definition at line 1603 of file profile.c.
References AcquireStringInfo(), AddValueToSplayTree(), CloneStringInfo(), ConstantString(), _StringInfo::datum, DestroyStringInfo(), GetStringInfoDatum(), GetStringInfoLength(), GetValueFromSplayTree(), _StringInfo::length, LocaleCompare(), LocaleNCompare(), _Image::profiles, ReadResourceByte(), ReadResourceLong(), ReadResourceShort(), and WriteResourceLong().
Referenced by DeleteImageProfile(), RemoveImageProfile(), and SetImageProfileInternal().