MagickCore 6.9.12
|
#include "magick/studio.h"
#include "magick/attribute.h"
#include "magick/cache.h"
#include "magick/color.h"
#include "magick/colorspace-private.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/option-private.h"
#include "magick/profile.h"
#include "magick/property.h"
#include "magick/quantum.h"
#include "magick/quantum-private.h"
#include "magick/resource_.h"
#include "magick/splay-tree.h"
#include "magick/string_.h"
#include "magick/string-private.h"
#include "magick/thread-private.h"
#include "magick/token.h"
#include "magick/utility.h"
Go to the source code of this file.
Macros | |
#define | GetLCMSPixel(source_info, pixel, index) (source_info.scale[index]*((QuantumScale*pixel)+source_info.translate[index])) |
#define | ProfileImageTag "Profile/Image" |
#define | SetLCMSPixel(target_info, pixel, index) ClampToQuantum(target_info.scale[index]*((QuantumRange*pixel)+target_info.translate[index])) |
#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 | |
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 StringInfo * | GetImageProfile (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 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) |
static MagickBooleanType | ValidateXMPProfile (Image *image, const StringInfo *profile) |
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 | SyncExifProfile (const Image *image, unsigned char *exif, size_t length) |
static MagickBooleanType | Sync8BimProfile (const Image *image, const StringInfo *profile) |
MagickExport MagickBooleanType | SyncImageProfiles (Image *image) |
#define EXIF_DELIMITER "\n" |
#define EXIF_NUM_FORMATS 12 |
#define GetLCMSPixel | ( | source_info, | |
pixel, | |||
index | |||
) | (source_info.scale[index]*((QuantumScale*pixel)+source_info.translate[index])) |
#define MaxDirectoryStack 16 |
#define ProfileImageTag "Profile/Image" |
#define SetLCMSPixel | ( | target_info, | |
pixel, | |||
index | |||
) | ClampToQuantum(target_info.scale[index]*((QuantumRange*pixel)+target_info.translate[index])) |
#define TAG_EXIF_OFFSET 0x8769 |
#define TAG_INTEROP_OFFSET 0xa005 |
#define ThrowProfileException | ( | severity, | |
tag, | |||
context | |||
) |
MagickExport MagickBooleanType CloneImageProfiles | ( | Image * | image, |
const Image * | clone_image | ||
) |
Definition at line 122 of file profile.c.
References CloneSplayTree(), CloneStringInfo(), _Image::color_profile, ConstantString(), DestroyImageProfiles(), _Image::filename, GetMagickModule, _ProfileInfo::info, _Image::iptc_profile, IsEventLogging(), _ProfileInfo::length, 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 169 of file profile.c.
References _Image::color_profile, _Image::debug, DeleteNodeFromSplayTree(), _Image::filename, GetMagickModule, _ProfileInfo::info, _Image::iptc_profile, _ProfileInfo::length, LocaleCompare(), LogMagickEvent(), MagickCoreSignature, MagickFalse, _Image::profiles, _Image::signature, TraceEvent, and WriteTo8BimProfile().
Referenced by ExtentImage(), ProfileImage(), ThumbnailImage(), and TransformImageColorspace().
MagickExport void DestroyImageProfiles | ( | Image * | image | ) |
Definition at line 219 of file profile.c.
References DestroySplayTree(), and _Image::profiles.
Referenced by CloneImageProfiles(), DestroyImage(), and StripImage().
|
static |
Definition at line 1389 of file profile.c.
References DestroyStringInfo().
Referenced by SetImageProfileInternal().
MagickExport const StringInfo * GetImageProfile | ( | const Image * | image, |
const char * | name | ||
) |
Definition at line 249 of file profile.c.
References _Image::debug, _Image::filename, GetMagickModule, GetValueFromSplayTree(), LogMagickEvent(), MagickCoreSignature, MagickFalse, _Image::profiles, _Image::signature, and TraceEvent.
Referenced by Get8BIMProperty(), GetEXIFProperty(), GetICCProperty(), GetIPTCProperty(), GetMagickProperty(), GetXMPProperty(), IdentifyImage(), ProfileImage(), ReadImage(), SetImageProfileInternal(), SetsRGBImageProfile(), and SyncImageProfiles().
MagickExport char * GetNextImageProfile | ( | const Image * | image | ) |
Definition at line 288 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 1542 of file profile.c.
References AcquireStringInfo(), DestroyStringInfo(), GetStringInfoDatum(), GetStringInfoLength(), LocaleNCompare(), MagickTrue, PixelsPerCentimeterResolution, PixelsPerInchResolution, ReadResourceByte(), ReadResourceLong(), ReadResourceShort(), SetImageProfileInternal(), SetStringInfoDatum(), _Image::units, _Image::x_resolution, and _Image::y_resolution.
Referenced by SetImageProfileInternal().
MagickExport MagickBooleanType ProfileImage | ( | Image * | image, |
const char * | name, | ||
const void * | datum, | ||
const size_t | length, | ||
const MagickBooleanType | magick_unusedclone | ||
) |
Definition at line 797 of file profile.c.
References AbsoluteIntent, AcquireAuthenticCacheView(), AcquirePixelTLS(), AcquireStringInfo(), _Image::black_point_compensation, CMYKColorspace, ColorSeparationMatteType, ColorSeparationType, _Image::colorspace, _Image::columns, CompareStringInfo(), DeleteImageProfile(), DestroyCacheView(), DestroyPixelTLS(), DestroyStringInfo(), DirectClass, _Image::exception, _Image::filename, GetCacheViewAuthenticIndexQueue(), GetCacheViewAuthenticPixels(), GetImageProfile(), GetImageProperty(), GetLCMSPixel, GetMagickModule, GetNextImageProfile(), GetOpenMPThreadId(), GetPixelBlue, GetPixelGreen, GetPixelIndex, GetPixelRed, GetStringInfoDatum(), GetStringInfoLength(), GRAYColorspace, GrayscaleMatteType, GrayscaleType, ImageError, IsEventLogging(), IsOptionMember(), LabColorspace, LocaleCompare(), LogMagickEvent(), magick_restrict, magick_unreferenced, MagickCoreSignature, MagickFalse, MagickTrue, _Image::matte, MissingDelegateWarning, PerceptualIntent, ProfileImageTag, _Image::progress_monitor, RelativeIntent, _Image::rendering_intent, ResetImageProfileIterator(), ResourceLimitError, _Image::rows, SaturationIntent, SetImageColorspace(), SetImageProfile(), SetImageProgress(), SetImageStorageClass(), SetLCMSPixel, SetPixelBlue, SetPixelGreen, SetPixelIndex, SetPixelRed, SetsRGBImageProfile(), SetStringInfoDatum(), _Image::signature, sRGBColorspace, SyncCacheViewAuthenticPixels(), ThrowBinaryImageException, ThrowMagickException(), ThrowProfileException, TraceEvent, TrueColorMatteType, TrueColorType, _Image::type, and XYZColorspace.
|
inlinestatic |
Definition at line 1816 of file profile.c.
Referenced by Sync8BimProfile(), and SyncExifProfile().
|
inlinestatic |
Definition at line 1856 of file profile.c.
References LSBEndian.
Referenced by ReadProfileMSBLong(), and SyncExifProfile().
|
inlinestatic |
Definition at line 1888 of file profile.c.
References MSBEndian, and ReadProfileLong().
Referenced by Sync8BimProfile().
|
inlinestatic |
Definition at line 1901 of file profile.c.
References MSBEndian, and ReadProfileShort().
Referenced by Sync8BimProfile().
|
inlinestatic |
Definition at line 1828 of file profile.c.
References LSBEndian.
Referenced by ReadProfileMSBShort(), and SyncExifProfile().
|
inlinestatic |
Definition at line 1394 of file profile.c.
Referenced by GetProfilesFromResourceBlock(), and WriteTo8BimProfile().
|
inlinestatic |
Definition at line 1401 of file profile.c.
Referenced by GetProfilesFromResourceBlock(), and WriteTo8BimProfile().
|
inlinestatic |
Definition at line 1411 of file profile.c.
Referenced by GetProfilesFromResourceBlock(), and WriteTo8BimProfile().
MagickExport StringInfo * RemoveImageProfile | ( | Image * | image, |
const char * | name | ||
) |
Definition at line 1290 of file profile.c.
References _Image::color_profile, _Image::filename, GetMagickModule, _ProfileInfo::info, _Image::iptc_profile, IsEventLogging(), _ProfileInfo::length, LocaleCompare(), LogMagickEvent(), MagickCoreSignature, MagickFalse, _Image::profiles, RemoveNodeFromSplayTree(), _Image::signature, TraceEvent, and WriteTo8BimProfile().
MagickExport void ResetImageProfileIterator | ( | const Image * | image | ) |
Definition at line 1347 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 | ||
) |
Definition at line 1786 of file profile.c.
References MagickFalse, and SetImageProfileInternal().
Referenced by ProfileImage(), SetImageProperty(), and SetsRGBImageProfile().
|
static |
Definition at line 1720 of file profile.c.
References AddValueToSplayTree(), CloneStringInfo(), _Image::color_profile, CompareSplayTreeString(), ConstantString(), CopyMagickString(), DestroyProfile(), _Image::filename, GetImageProfile(), GetMagickModule, GetProfilesFromResourceBlock(), GetStringInfoDatum(), GetStringInfoLength(), _ProfileInfo::info, _Image::iptc_profile, IsEventLogging(), _ProfileInfo::length, LocaleCompare(), LocaleLower(), LogMagickEvent(), MagickCoreSignature, MagickFalse, MagickTrue, MaxTextExtent, NewSplayTree(), _Image::profiles, RelinquishMagickMemory(), _Image::signature, TraceEvent, ValidateXMPProfile(), and WriteTo8BimProfile().
Referenced by GetProfilesFromResourceBlock(), and SetImageProfile().
|
static |
Definition at line 505 of file profile.c.
References AcquireStringInfo(), DestroyStringInfo(), GetImageProfile(), MagickCoreSignature, MagickFalse, SetImageProfile(), SetStringInfoDatum(), and _Image::signature.
Referenced by ProfileImage().
|
static |
Definition at line 2175 of file profile.c.
References CastDoubleToLong(), GetStringInfoDatum(), GetStringInfoLength(), MagickFalse, MagickTrue, MSBEndian, PixelsPerCentimeterResolution, ReadProfileByte(), ReadProfileMSBLong(), ReadProfileMSBShort(), SyncExifProfile(), _Image::units, WriteProfileLong(), WriteProfileShort(), _Image::x_resolution, and _Image::y_resolution.
Referenced by SyncImageProfiles().
|
static |
Definition at line 1955 of file profile.c.
References AddValueToSplayTree(), DestroySplayTree(), EXIF_NUM_FORMATS, GetValueFromSplayTree(), LSBEndian, MagickFalse, MagickTrue, MaxDirectoryStack, MSBEndian, NewSplayTree(), _Image::orientation, ReadProfileByte(), ReadProfileLong(), ReadProfileShort(), TAG_EXIF_OFFSET, TAG_INTEROP_OFFSET, _Image::units, WriteProfileLong(), WriteProfileShort(), _Image::x_resolution, and _Image::y_resolution.
Referenced by Sync8BimProfile(), and SyncImageProfiles().
MagickExport MagickBooleanType SyncImageProfiles | ( | Image * | image | ) |
Definition at line 2240 of file profile.c.
References GetImageProfile(), GetStringInfoDatum(), GetStringInfoLength(), MagickFalse, MagickTrue, Sync8BimProfile(), and SyncExifProfile().
Referenced by WriteImage().
|
static |
Definition at line 1710 of file profile.c.
References _Image::exception, _Image::filename, GetMagickModule, MagickFalse, MissingDelegateWarning, and ThrowMagickException().
Referenced by SetImageProfileInternal().
|
inlinestatic |
Definition at line 1915 of file profile.c.
References LSBEndian.
Referenced by Sync8BimProfile(), and SyncExifProfile().
|
static |
Definition at line 1937 of file profile.c.
References LSBEndian.
Referenced by Sync8BimProfile(), and SyncExifProfile().
|
inlinestatic |
Definition at line 1419 of file profile.c.
Referenced by WriteTo8BimProfile().
|
static |
Definition at line 1432 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().