#include "magick/studio.h"#include "magick/cache.h"#include "magick/color.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/profile.h"#include "magick/property.h"#include "magick/quantum.h"#include "magick/quantum-private.h"#include "magick/splay-tree.h"#include "magick/string_.h"#include "magick/thread-private.h"#include "magick/token.h"#include "magick/utility.h"#include "lcms.h"
Go to the source code of this file.
Defines | |
| #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 |
Functions | |
| 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 unsigned short ** | DestroyPixelThreadSet (unsigned short **pixels) |
| static unsigned short ** | AcquirePixelThreadSet (const size_t columns, const size_t channels) |
| static cmsHTRANSFORM * | DestroyTransformThreadSet (cmsHTRANSFORM *transform) |
| static cmsHTRANSFORM * | AcquireTransformThreadSet (const cmsHPROFILE source_profile, const DWORD source_type, const cmsHPROFILE target_profile, const DWORD target_type, const int intent, const DWORD flags) |
| static MagickBooleanType | SetAdobeRGB1998ImageProfile (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 * | ReadResourceBytes (const unsigned char *p, const ssize_t count, unsigned char *quantum) |
| static const unsigned char * | ReadResourceLong (const unsigned char *p, unsigned long *quantum) |
| static const unsigned char * | ReadResourceShort (const unsigned char *p, unsigned short *quantum) |
| static MagickBooleanType | 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 unsigned short | ReadProfileShort (const EndianType endian, unsigned char *buffer) |
| static unsigned long | ReadProfileLong (const EndianType endian, unsigned char *buffer) |
| static void | WriteProfileLong (const EndianType endian, const unsigned long value, unsigned char *p) |
| static void | WriteProfileShort (const EndianType endian, const unsigned short value, unsigned char *p) |
| MagickExport MagickBooleanType | SyncImageProfiles (Image *image) |
| #define EXIF_DELIMITER "\n" |
| #define EXIF_NUM_FORMATS 12 |
Referenced by SyncImageProfiles().
| #define MaxDirectoryStack 16 |
Referenced by GetEXIFProperty(), and SyncImageProfiles().
| #define ProfileImageTag "Profile/Image" |
Referenced by ProfileImage().
| #define TAG_EXIF_OFFSET 0x8769 |
Referenced by GetEXIFProperty(), and SyncImageProfiles().
| #define TAG_INTEROP_OFFSET 0xa005 |
Referenced by GetEXIFProperty(), and SyncImageProfiles().
| #define ThrowProfileException | ( | severity, | |||
| tag, | |||||
| context | ) |
{ \
(void) cmsCloseProfile(source_profile); \
(void) cmsCloseProfile(target_profile); \
ThrowBinaryException(severity,tag,context); \
}
Referenced by ProfileImage().
| static unsigned short** AcquirePixelThreadSet | ( | const size_t | columns, | |
| const size_t | channels | |||
| ) | [static] |
Definition at line 329 of file profile.c.
References AcquireAlignedMemory(), AcquireQuantumMemory(), DestroyPixelThreadSet(), GetOpenMPMaximumThreads(), and ResetMagickMemory().
Referenced by ProfileImage().
| static cmsHTRANSFORM* AcquireTransformThreadSet | ( | const cmsHPROFILE | source_profile, | |
| const DWORD | source_type, | |||
| const cmsHPROFILE | target_profile, | |||
| const DWORD | target_type, | |||
| const int | intent, | |||
| const DWORD | flags | |||
| ) | [static] |
Definition at line 370 of file profile.c.
References AcquireAlignedMemory(), DestroyTransformThreadSet(), GetOpenMPMaximumThreads(), and ResetMagickMemory().
Referenced by ProfileImage().
| MagickExport MagickBooleanType CloneImageProfiles | ( | Image * | image, | |
| const Image * | clone_image | |||
| ) |
Definition at line 96 of file profile.c.
References CloneSplayTree(), CloneStringInfo(), _Image::color_profile, ConstantString(), _Image::debug, _Image::filename, GetMagickModule, _ProfileInfo::info, _Image::iptc_profile, _ProfileInfo::length, LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, _Image::profiles, _Image::signature, and TraceEvent.
Referenced by CloneImage(), CoalesceImages(), and DisposeImages().
| MagickExport MagickBooleanType DeleteImageProfile | ( | Image * | image, | |
| const char * | name | |||
| ) |
Definition at line 139 of file profile.c.
References _Image::color_profile, _Image::debug, DeleteNodeFromSplayTree(), _Image::filename, GetMagickModule, _ProfileInfo::info, _Image::iptc_profile, _ProfileInfo::length, LocaleCompare(), LogMagickEvent(), MagickFalse, MagickSignature, _Image::profiles, _Image::signature, and TraceEvent.
Referenced by ProfileImage(), and ThumbnailImage().
| MagickExport void DestroyImageProfiles | ( | Image * | image | ) |
Definition at line 189 of file profile.c.
References DestroySplayTree(), and _Image::profiles.
Referenced by DestroyImage(), and StripImage().
| static unsigned short** DestroyPixelThreadSet | ( | unsigned short ** | pixels | ) | [static] |
Definition at line 316 of file profile.c.
References GetOpenMPMaximumThreads(), RelinquishAlignedMemory(), and RelinquishMagickMemory().
Referenced by AcquirePixelThreadSet(), and ProfileImage().
| static void* DestroyProfile | ( | void * | profile | ) | [static] |
Definition at line 1399 of file profile.c.
References DestroyStringInfo().
Referenced by SetImageProfile().
| static cmsHTRANSFORM* DestroyTransformThreadSet | ( | cmsHTRANSFORM * | transform | ) | [static] |
Definition at line 357 of file profile.c.
References GetOpenMPMaximumThreads(), and RelinquishAlignedMemory().
Referenced by AcquireTransformThreadSet(), and ProfileImage().
| MagickExport const StringInfo* GetImageProfile | ( | const Image * | image, | |
| const char * | name | |||
| ) |
Definition at line 219 of file profile.c.
References CopyMagickString(), _Image::debug, _Image::filename, GetMagickModule, GetValueFromSplayTree(), LogMagickEvent(), MagickFalse, MagickSignature, MaxTextExtent, _Image::profiles, _Image::signature, and TraceEvent.
Referenced by Get8BIMProperty(), GetEXIFProperty(), GetIPTCProperty(), GetXMPProperty(), IdentifyImage(), ProfileImage(), ReadImage(), SetAdobeRGB1998ImageProfile(), SetImageProfile(), SetsRGBImageProfile(), and SyncImageProfiles().
| MagickExport char* GetNextImageProfile | ( | const Image * | image | ) |
Definition at line 262 of file profile.c.
References _Image::debug, _Image::filename, GetMagickModule, GetNextKeyInSplayTree(), LogMagickEvent(), MagickFalse, MagickSignature, _Image::profiles, _Image::signature, and TraceEvent.
Referenced by IdentifyImage(), ProfileImage(), and ThumbnailImage().
| static MagickBooleanType GetProfilesFromResourceBlock | ( | Image * | image, | |
| const StringInfo * | resource_block | |||
| ) | [static] |
Definition at line 1440 of file profile.c.
References AcquireStringInfo(), DestroyStringInfo(), GetStringInfoDatum(), GetStringInfoLength(), LocaleNCompare(), MagickTrue, ReadResourceByte(), ReadResourceLong(), ReadResourceShort(), SetImageProfile(), SetStringInfoDatum(), _Image::x_resolution, and _Image::y_resolution.
Referenced by SetImageProfile().
| MagickExport MagickBooleanType ProfileImage | ( | Image * | image, | |
| const char * | name, | |||
| const void * | datum, | |||
| const size_t | length, | |||
| const MagickBooleanType | magick_unusedclone | |||
| ) |
Definition at line 796 of file profile.c.
References AbsoluteIntent, AcquireCacheView(), AcquirePixelThreadSet(), AcquireStringInfo(), AcquireTransformThreadSet(), _Image::black_point_compensation, CMYKColorspace, ColorSeparationMatteType, ColorSeparationType, _Image::colorspace, _Image::columns, CompareStringInfo(), ConstantString(), _Image::debug, DeleteImageProfile(), DestroyCacheView(), DestroyPixelThreadSet(), DestroyString(), DestroyStringInfo(), DestroyTransformThreadSet(), DirectClass, _Image::exception, _Image::filename, GetCacheViewAuthenticIndexQueue(), GetCacheViewAuthenticPixels(), GetImageProfile(), GetImageProperty(), GetMagickModule, GetNextImageProfile(), GetOpenMPThreadId(), GetStringInfoDatum(), GetStringInfoLength(), GlobExpression(), GRAYColorspace, GrayscaleMatteType, GrayscaleType, ImageError, IsGrayImage(), LabColorspace, LocaleCompare(), LogMagickEvent(), MagickFalse, MagickSignature, MagickTrue, _Image::matte, MissingDelegateWarning, PerceptualIntent, ProfileImageTag, _Image::progress_monitor, RelativeIntent, RelinquishMagickMemory(), _Image::rendering_intent, ResetImageProfileIterator(), ResourceLimitError, RGBColorspace, _Image::rows, SaturationIntent, ScaleQuantumToShort(), ScaleShortToQuantum(), SetAdobeRGB1998ImageProfile(), SetImageColorspace(), SetImageProfile(), SetImageProgress(), SetImageStorageClass(), SetsRGBImageProfile(), SetStringInfoDatum(), _Image::signature, StringToArgv(), SubstituteString(), SyncCacheViewAuthenticPixels(), ThrowBinaryException, ThrowMagickException(), ThrowProfileException, TraceEvent, TrueColorMatteType, TrueColorType, _Image::type, UndefinedColorspace, XYZColorspace, YCbCrColorspace, and YUVColorspace.
| static int ReadProfileByte | ( | unsigned char ** | p, | |
| size_t * | length | |||
| ) | [inline, static] |
Definition at line 1650 of file profile.c.
Referenced by SyncImageProfiles().
| static unsigned long ReadProfileLong | ( | const EndianType | endian, | |
| unsigned char * | buffer | |||
| ) | [inline, static] |
| static unsigned short ReadProfileShort | ( | const EndianType | endian, | |
| unsigned char * | buffer | |||
| ) | [inline, static] |
| static const unsigned char* ReadResourceByte | ( | const unsigned char * | p, | |
| unsigned char * | quantum | |||
| ) | [inline, static] |
Definition at line 1404 of file profile.c.
Referenced by GetProfilesFromResourceBlock().
| static const unsigned char* ReadResourceBytes | ( | const unsigned char * | p, | |
| const ssize_t | count, | |||
| unsigned char * | quantum | |||
| ) | [inline, static] |
| static const unsigned char* ReadResourceLong | ( | const unsigned char * | p, | |
| unsigned long * | quantum | |||
| ) | [inline, static] |
Definition at line 1422 of file profile.c.
Referenced by GetProfilesFromResourceBlock().
| static const unsigned char* ReadResourceShort | ( | const unsigned char * | p, | |
| unsigned short * | quantum | |||
| ) | [inline, static] |
Definition at line 1432 of file profile.c.
Referenced by GetProfilesFromResourceBlock().
| MagickExport StringInfo* RemoveImageProfile | ( | Image * | image, | |
| const char * | name | |||
| ) |
Definition at line 1301 of file profile.c.
References _Image::color_profile, _Image::debug, _Image::filename, GetMagickModule, _ProfileInfo::info, _Image::iptc_profile, _ProfileInfo::length, LocaleCompare(), LogMagickEvent(), MagickFalse, MagickSignature, _Image::profiles, RemoveNodeFromSplayTree(), _Image::signature, and TraceEvent.
| MagickExport void ResetImageProfileIterator | ( | const Image * | image | ) |
Definition at line 1357 of file profile.c.
References _Image::debug, _Image::filename, GetMagickModule, LogMagickEvent(), MagickFalse, MagickSignature, _Image::profiles, ResetSplayTreeIterator(), _Image::signature, and TraceEvent.
Referenced by IdentifyImage(), ProfileImage(), and ThumbnailImage().
| static MagickBooleanType SetAdobeRGB1998ImageProfile | ( | Image * | image | ) | [static] |
Definition at line 401 of file profile.c.
References AcquireStringInfo(), DestroyStringInfo(), GetImageProfile(), MagickFalse, MagickSignature, SetImageProfile(), SetStringInfoDatum(), and _Image::signature.
Referenced by ProfileImage().
| MagickExport MagickBooleanType SetImageProfile | ( | Image * | image, | |
| const char * | name, | |||
| const StringInfo * | profile | |||
| ) |
Definition at line 1565 of file profile.c.
References AddValueToSplayTree(), CloneStringInfo(), _Image::color_profile, CompareSplayTreeString(), ConstantString(), CopyMagickString(), _Image::debug, DestroyProfile(), _Image::filename, FormatMagickString(), GetImageProfile(), GetImageProperty(), GetMagickModule, GetProfilesFromResourceBlock(), GetStringInfoDatum(), GetStringInfoLength(), _ProfileInfo::info, _Image::iptc_profile, _ProfileInfo::length, LocaleCompare(), LogMagickEvent(), MagickFalse, MagickSignature, MaxTextExtent, NewSplayTree(), _Image::profiles, RelinquishMagickMemory(), _Image::signature, and TraceEvent.
Referenced by GetProfilesFromResourceBlock(), ProfileImage(), SetAdobeRGB1998ImageProfile(), and SetsRGBImageProfile().
| static MagickBooleanType SetsRGBImageProfile | ( | Image * | image | ) | [static] |
Definition at line 476 of file profile.c.
References AcquireStringInfo(), DestroyStringInfo(), GetImageProfile(), MagickFalse, MagickSignature, SetImageProfile(), SetStringInfoDatum(), and _Image::signature.
Referenced by ProfileImage().
| MagickExport MagickBooleanType SyncImageProfiles | ( | Image * | image | ) |
Definition at line 1735 of file profile.c.
References EXIF_NUM_FORMATS, GetImageProfile(), GetStringInfoDatum(), GetStringInfoLength(), LSBEndian, MagickFalse, MagickTrue, MaxDirectoryStack, MSBEndian, _Image::orientation, ReadProfileByte(), ReadProfileLong(), ReadProfileShort(), TAG_EXIF_OFFSET, TAG_INTEROP_OFFSET, _Image::units, WriteProfileLong(), WriteProfileShort(), _Image::x_resolution, and _Image::y_resolution.
Referenced by WriteImage().
| static void WriteProfileLong | ( | const EndianType | endian, | |
| const unsigned long | value, | |||
| unsigned char * | p | |||
| ) | [inline, static] |
Definition at line 1695 of file profile.c.
References CopyMagickMemory(), and MSBEndian.
Referenced by SyncImageProfiles().
| static void WriteProfileShort | ( | const EndianType | endian, | |
| const unsigned short | value, | |||
| unsigned char * | p | |||
| ) | [static] |
Definition at line 1717 of file profile.c.
References CopyMagickMemory(), and MSBEndian.
Referenced by SyncImageProfiles().
1.6.1