MagickCore  6.9.10
Convert, Edit, Or Compose Bitmap Images
profile.h
Go to the documentation of this file.
1 /*
2  Copyright 1999-2019 ImageMagick Studio LLC, a non-profit organization
3  dedicated to making software imaging solutions freely available.
4 
5  You may not use this file except in compliance with the License.
6  obtain a copy of the License at
7 
8  https://imagemagick.org/script/license.php
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 
16  MagickCore image profile methods.
17 */
18 #ifndef MAGICKCORE_PROFILE_H
19 #define MAGICKCORE_PROFILE_H
20 
21 #include "magick/string_.h"
22 
23 #if defined(__cplusplus) || defined(c_plusplus)
24 extern "C" {
25 #endif
26 
27 typedef struct _ProfileInfo
28 {
29  char
30  *name;
31 
32  size_t
34 
35  unsigned char
36  *info;
37 
38  size_t
40 } ProfileInfo;
41 
42 typedef enum
43 {
50 
51 extern MagickExport char
52  *GetNextImageProfile(const Image *);
53 
54 extern MagickExport const StringInfo
55  *GetImageProfile(const Image *,const char *);
56 
58  CloneImageProfiles(Image *,const Image *),
59  DeleteImageProfile(Image *,const char *),
60  ProfileImage(Image *,const char *,const void *,const size_t,
61  const MagickBooleanType),
62  SetImageProfile(Image *,const char *,const StringInfo *),
64 
66  *RemoveImageProfile(Image *,const char *);
67 
68 extern MagickExport void
71 
72 #if defined(__cplusplus) || defined(c_plusplus)
73 }
74 #endif
75 #endif
TAG_INTEROP_OFFSET
#define TAG_INTEROP_OFFSET
_PolicyInfo::value
char * value
Definition: policy.c:85
MagickExport
#define MagickExport
Definition: method-attribute.h:80
_Image::debug
MagickBooleanType debug
Definition: image.h:290
_Image::filename
char filename[MaxTextExtent]
Definition: image.h:278
profile.h
GetProfilesFromResourceBlock
static void GetProfilesFromResourceBlock(Image *image, const StringInfo *resource_block)
Definition: profile.c:1543
SetImageProgress
MagickExport MagickBooleanType SetImageProgress(const Image *image, const char *tag, const MagickOffsetType offset, const MagickSizeType extent)
Definition: monitor.c:136
magick_unused
#define magick_unused(x)
Definition: method-attribute.h:105
PixelsPerCentimeterResolution
@ PixelsPerCentimeterResolution
Definition: image.h:94
ColorSeparationType
@ ColorSeparationType
Definition: image.h:59
DirectClass
@ DirectClass
Definition: magick-type.h:187
NewSplayTree
MagickExport SplayTreeInfo * NewSplayTree(int(*compare)(const void *, const void *), void *(*relinquish_key)(void *), void *(*relinquish_value)(void *))
Definition: splay-tree.c:1140
RemoveNodeFromSplayTree
MagickExport void * RemoveNodeFromSplayTree(SplayTreeInfo *splay_tree, const void *key)
Definition: splay-tree.c:1300
magick_unreferenced
#define magick_unreferenced(x)
Definition: method-attribute.h:106
SaturationIntent
@ SaturationIntent
Definition: profile.h:45
ProfileImage
MagickExport MagickBooleanType ProfileImage(Image *image, const char *name, const void *datum, const size_t length, const MagickBooleanType magick_unused(clone))
Definition: profile.c:761
GetMagickModule
#define GetMagickModule()
Definition: log.h:29
DestroyCacheView
MagickExport CacheView * DestroyCacheView(CacheView *cache_view)
Definition: cache-view.c:256
ReadProfileLong
static signed int ReadProfileLong(const EndianType endian, unsigned char *buffer)
Definition: profile.c:1857
_ProfileInfo::info
unsigned char * info
Definition: profile.h:36
_SplayTreeInfo
Definition: splay-tree.c:82
GetNextImageProfile
MagickExport char * GetNextImageProfile(const Image *image)
Definition: profile.c:314
MagickCoreSignature
#define MagickCoreSignature
Definition: method-attribute.h:86
FormatLocaleString
MagickExport ssize_t FormatLocaleString(char *magick_restrict string, const size_t length, const char *magick_restrict format,...)
Definition: locale.c:502
ProfileImageTag
#define ProfileImageTag
GetImageProperty
const MagickExport char * GetImageProperty(const Image *image, const char *property)
Definition: property.c:2217
WriteTo8BimProfile
static void WriteTo8BimProfile(Image *, const char *, const StringInfo *)
Definition: profile.c:1433
_PolicyInfo::signature
size_t signature
Definition: policy.c:96
CloneImageProfiles
MagickExport MagickBooleanType CloneImageProfiles(Image *, const Image *)
GetCacheViewAuthenticPixels
MagickExport PixelPacket * GetCacheViewAuthenticPixels(CacheView *cache_view, const ssize_t x, const ssize_t y, const size_t columns, const size_t rows, ExceptionInfo *exception)
Definition: cache-view.c:473
magick_restrict
#define magick_restrict
Definition: MagickCore.h:41
ProfileInfo
struct _ProfileInfo ProfileInfo
property.h
SetPixelRed
#define SetPixelRed(pixel, value)
Definition: pixel-accessor.h:82
GetStringInfoLength
MagickExport size_t GetStringInfoLength(const StringInfo *string_info)
Definition: string.c:1304
quantum-private.h
DestroyImageProfiles
MagickExport void DestroyImageProfiles(Image *)
ReadResourceLong
static const unsigned char * ReadResourceLong(const unsigned char *p, unsigned int *quantum)
Definition: profile.c:1402
WriteProfileShort
static void WriteProfileShort(const EndianType endian, const unsigned short value, unsigned char *p)
Definition: profile.c:1938
monitor.h
LCMSScaleTarget
#define LCMSScaleTarget(pixel)
Definition: profile.c:108
_ProfileInfo
Definition: profile.h:27
SetPixelGreen
#define SetPixelGreen(pixel, value)
Definition: pixel-accessor.h:77
WriteResourceLong
static void WriteResourceLong(unsigned char *p, const unsigned int quantum)
Definition: profile.c:1420
ReadResourceShort
static const unsigned char * ReadResourceShort(const unsigned char *p, unsigned short *quantum)
Definition: profile.c:1412
_Image::iptc_profile
ProfileInfo iptc_profile
Definition: image.h:300
DestroyProfile
static void * DestroyProfile(void *profile)
Definition: profile.c:1390
IndexPacket
Quantum IndexPacket
Definition: pixel.h:129
resource_.h
sRGBColorspace
@ sRGBColorspace
Definition: colorspace.h:40
TrueColorMatteType
@ TrueColorMatteType
Definition: image.h:58
WriteProfileLong
static void WriteProfileLong(const EndianType endian, const size_t value, unsigned char *p)
Definition: profile.c:1916
GetPixelRed
#define GetPixelRed(pixel)
Definition: pixel-accessor.h:50
DestroySplayTree
MagickExport SplayTreeInfo * DestroySplayTree(SplayTreeInfo *splay_tree)
Definition: splay-tree.c:681
PixelsPerInchResolution
@ PixelsPerInchResolution
Definition: image.h:93
ColorSeparationMatteType
@ ColorSeparationMatteType
Definition: image.h:60
ResourceLimitError
@ ResourceLimitError
Definition: exception.h:55
TransformEvent
@ TransformEvent
Definition: log.h:52
utility.h
XYZColorspace
@ XYZColorspace
Definition: colorspace.h:33
_CacheView
Definition: cache-view.c:65
string_.h
ReadProfileMSBShort
static signed short ReadProfileMSBShort(unsigned char **p, size_t *length)
Definition: profile.c:1902
TrueColorType
@ TrueColorType
Definition: image.h:57
quantum.h
TAG_EXIF_OFFSET
#define TAG_EXIF_OFFSET
ThrowBinaryImageException
#define ThrowBinaryImageException(severity, tag, context)
Definition: exception-private.h:35
AbsoluteIntent
@ AbsoluteIntent
Definition: profile.h:47
MagickTrue
@ MagickTrue
Definition: magick-type.h:194
RemoveImageProfile
MagickExport StringInfo * RemoveImageProfile(Image *, const char *)
Definition: profile.c:1291
SetImageProfileInternal
static MagickBooleanType SetImageProfileInternal(Image *, const char *, const StringInfo *, const MagickBooleanType)
Definition: profile.c:1711
GetPixelIndex
#define GetPixelIndex(indexes)
Definition: pixel-accessor.h:44
SyncCacheViewAuthenticPixels
MagickExport MagickBooleanType SyncCacheViewAuthenticPixels(CacheView *magick_restrict cache_view, ExceptionInfo *exception)
Definition: cache-view.c:1000
CopyMagickString
MagickExport size_t CopyMagickString(char *destination, const char *source, const size_t length)
Definition: string.c:752
GetImageProfile
const MagickExport StringInfo * GetImageProfile(const Image *, const char *)
Definition: profile.c:275
AcquireStringInfo
MagickExport StringInfo * AcquireStringInfo(const size_t length)
Definition: string.c:185
CloneImageProfiles
MagickExport MagickBooleanType CloneImageProfiles(Image *image, const Image *clone_image)
Definition: profile.c:148
EndianType
EndianType
Definition: quantum.h:31
thread-private.h
hashmap.h
ReadProfileMSBLong
static signed int ReadProfileMSBLong(unsigned char **p, size_t *length)
Definition: profile.c:1889
TraceEvent
@ TraceEvent
Definition: log.h:38
ReadProfileByte
static int ReadProfileByte(unsigned char **p, size_t *length)
Definition: profile.c:1817
YUVColorspace
@ YUVColorspace
Definition: colorspace.h:38
DestroyPixelThreadSet
static DoublePixelPacket ** DestroyPixelThreadSet(DoublePixelPacket **pixels)
Definition: quantize.c:1388
ResetImageProfileIterator
MagickExport void ResetImageProfileIterator(const Image *image)
Definition: profile.c:1348
ImageWarning
@ ImageWarning
Definition: exception.h:46
LocaleNCompare
MagickExport int LocaleNCompare(const char *p, const char *q, const size_t length)
Definition: locale.c:1542
AcquirePixelThreadSet
static DoublePixelPacket ** AcquirePixelThreadSet(const size_t count)
Definition: quantize.c:1401
_Image
Definition: image.h:152
SetStringInfoDatum
MagickExport void SetStringInfoDatum(StringInfo *string_info, const unsigned char *source)
Definition: string.c:1773
ThrowProfileException
#define ThrowProfileException(severity, tag, context)
GetCacheViewAuthenticIndexQueue
MagickExport IndexPacket * GetCacheViewAuthenticIndexQueue(CacheView *cache_view)
Definition: cache-view.c:564
CompareSplayTreeString
MagickExport int CompareSplayTreeString(const void *target, const void *source)
Definition: splay-tree.c:411
_StringInfo::length
size_t length
Definition: string_.h:38
AcquireAuthenticCacheView
MagickExport CacheView * AcquireAuthenticCacheView(const Image *image, ExceptionInfo *exception)
Definition: cache-view.c:111
GrayscaleMatteType
@ GrayscaleMatteType
Definition: image.h:54
ImageError
@ ImageError
Definition: exception.h:69
_Image::orientation
OrientationType orientation
Definition: image.h:167
_StringInfo::datum
unsigned char * datum
Definition: string_.h:35
LocaleCompare
MagickExport int LocaleCompare(const char *p, const char *q)
Definition: locale.c:1440
GetNextImageProfile
MagickExport char * GetNextImageProfile(const Image *)
Definition: profile.c:314
ColorspaceType
ColorspaceType
Definition: colorspace.h:25
attribute.h
option-private.h
SetImageProfile
MagickExport MagickBooleanType SetImageProfile(Image *image, const char *name, const StringInfo *profile)
Definition: profile.c:1787
SyncImageProfiles
MagickExport MagickBooleanType SyncImageProfiles(Image *image)
Definition: profile.c:2244
ResolutionType
ResolutionType
Definition: image.h:90
_Image::y_resolution
double y_resolution
Definition: image.h:210
_Image::exception
ExceptionInfo exception
Definition: image.h:287
splay-tree.h
_Image::x_resolution
double x_resolution
Definition: image.h:209
SetPixelBlue
#define SetPixelBlue(pixel, value)
Definition: pixel-accessor.h:71
GetValueFromSplayTree
const MagickExport void * GetValueFromSplayTree(SplayTreeInfo *splay_tree, const void *key)
Definition: splay-tree.c:920
MagickFalse
@ MagickFalse
Definition: magick-type.h:193
MagickProgressMonitor
MagickBooleanType(* MagickProgressMonitor)(const char *, const MagickOffsetType, const MagickSizeType, void *)
Definition: monitor.h:26
GetImageProfile
const MagickExport StringInfo * GetImageProfile(const Image *image, const char *name)
Definition: profile.c:275
GetPixelBlue
#define GetPixelBlue(pixel)
Definition: pixel-accessor.h:38
EXIF_NUM_FORMATS
#define EXIF_NUM_FORMATS
image.h
ResetImageProfileIterator
MagickExport void ResetImageProfileIterator(const Image *)
Definition: profile.c:1348
ProfileImage
MagickExport MagickBooleanType ProfileImage(Image *, const char *, const void *, const size_t, const MagickBooleanType)
LocaleLower
MagickExport void LocaleLower(char *string)
Definition: locale.c:1495
_ProfileInfo::signature
size_t signature
Definition: profile.h:39
AddValueToSplayTree
MagickExport MagickBooleanType AddValueToSplayTree(SplayTreeInfo *splay_tree, const void *key, const void *value)
Definition: splay-tree.c:153
ResetSplayTreeIterator
MagickExport void ResetSplayTreeIterator(SplayTreeInfo *splay_tree)
Definition: splay-tree.c:1473
DeleteImageProfile
MagickExport MagickBooleanType DeleteImageProfile(Image *image, const char *name)
Definition: profile.c:195
CMYKColorspace
@ CMYKColorspace
Definition: colorspace.h:39
RelativeIntent
@ RelativeIntent
Definition: profile.h:48
DeleteImageProfile
MagickExport MagickBooleanType DeleteImageProfile(Image *, const char *)
cache.h
ConstantString
MagickExport char * ConstantString(const char *source)
Definition: string.c:697
Sync8BimProfile
static MagickBooleanType Sync8BimProfile(Image *image, StringInfo *profile)
Definition: profile.c:1956
MaxDirectoryStack
#define MaxDirectoryStack
_Image::signature
size_t signature
Definition: image.h:307
MagickBooleanType
MagickBooleanType
Definition: magick-type.h:191
RelinquishMagickMemory
MagickExport void * RelinquishMagickMemory(void *memory)
Definition: memory.c:1077
LSBEndian
@ LSBEndian
Definition: quantum.h:34
_ExceptionInfo
Definition: exception.h:102
SyncExifProfile
static MagickBooleanType SyncExifProfile(Image *image, StringInfo *profile)
Definition: profile.c:2018
SetPixelIndex
#define SetPixelIndex(indexes, value)
Definition: pixel-accessor.h:78
studio.h
LCMSScaleSource
#define LCMSScaleSource(pixel)
Definition: profile.c:107
monitor-private.h
ReadResourceByte
static const unsigned char * ReadResourceByte(const unsigned char *p, unsigned char *quantum)
Definition: profile.c:1395
_PolicyInfo::name
char * name
Definition: policy.c:83
GRAYColorspace
@ GRAYColorspace
Definition: colorspace.h:29
CompareStringInfo
MagickExport int CompareStringInfo(const StringInfo *target, const StringInfo *source)
Definition: string.c:376
IsOptionMember
MagickExport MagickBooleanType IsOptionMember(const char *option, const char *options)
Definition: option.c:2338
GrayscaleType
@ GrayscaleType
Definition: image.h:53
LCMSType
double LCMSType
Definition: profile.c:110
ThreadResource
@ ThreadResource
Definition: resource_.h:33
CloneStringInfo
MagickExport StringInfo * CloneStringInfo(const StringInfo *string_info)
Definition: string.c:336
RenderingIntent
RenderingIntent
Definition: profile.h:42
CloneSplayTree
MagickExport SplayTreeInfo * CloneSplayTree(SplayTreeInfo *splay_tree, void *(*clone_key)(void *), void *(*clone_value)(void *))
Definition: splay-tree.c:345
memory_.h
UndefinedIntent
@ UndefinedIntent
Definition: profile.h:44
GetStringInfoDatum
MagickExport unsigned char * GetStringInfoDatum(const StringInfo *string_info)
Definition: string.c:1275
MSBEndian
@ MSBEndian
Definition: quantum.h:35
_ProfileInfo::name
char * name
Definition: profile.h:30
color.h
exception-private.h
_ProfileInfo::length
size_t length
Definition: profile.h:33
ThrowMagickException
MagickExport MagickBooleanType ThrowMagickException(ExceptionInfo *exception, const char *module, const char *function, const size_t line, const ExceptionType severity, const char *tag, const char *format,...)
Definition: exception.c:1068
exception.h
option.h
SyncImageProfiles
MagickExport MagickBooleanType SyncImageProfiles(Image *)
Definition: profile.c:2244
DestroyStringInfo
MagickExport StringInfo * DestroyStringInfo(StringInfo *string_info)
Definition: string.c:847
SetImageStorageClass
MagickExport MagickBooleanType SetImageStorageClass(Image *image, const ClassType storage_class)
Definition: image.c:2610
GetPixelGreen
#define GetPixelGreen(pixel)
Definition: pixel-accessor.h:43
_Image::color_profile
ProfileInfo color_profile
Definition: image.h:299
GetNextKeyInSplayTree
const MagickExport void * GetNextKeyInSplayTree(SplayTreeInfo *splay_tree)
Definition: splay-tree.c:768
_Image::profiles
void * profiles
Definition: image.h:195
LogMagickEvent
MagickExport MagickBooleanType LogMagickEvent(const LogEventType type, const char *module, const char *function, const size_t line, const char *format,...)
Definition: log.c:1399
DestroyImageProfiles
MagickExport void DestroyImageProfiles(Image *image)
Definition: profile.c:245
MaxTextExtent
#define MaxTextExtent
Definition: method-attribute.h:89
_Image::units
ResolutionType units
Definition: image.h:198
colorspace-private.h
LabColorspace
@ LabColorspace
Definition: colorspace.h:32
token.h
SetsRGBImageProfile
static MagickBooleanType SetsRGBImageProfile(Image *image)
Definition: profile.c:469
RemoveImageProfile
MagickExport StringInfo * RemoveImageProfile(Image *image, const char *name)
Definition: profile.c:1291
ValidateXMPProfile
static MagickBooleanType ValidateXMPProfile(const StringInfo *profile)
Definition: profile.c:1688
_StringInfo
Definition: string_.h:29
MissingDelegateWarning
@ MissingDelegateWarning
Definition: exception.h:36
GetMagickResourceLimit
MagickExport MagickSizeType GetMagickResourceLimit(const ResourceType type)
Definition: resource.c:771
_PixelPacket
Definition: pixel.h:131
ReadProfileShort
static signed short ReadProfileShort(const EndianType endian, unsigned char *buffer)
Definition: profile.c:1829
AcquireQuantumMemory
MagickExport void * AcquireQuantumMemory(const size_t count, const size_t quantum)
Definition: memory.c:544
configure.h
PerceptualIntent
@ PerceptualIntent
Definition: profile.h:46
MagickOffsetType
ssize_t MagickOffsetType
Definition: magick-type.h:135
GetOpenMPThreadId
static int GetOpenMPThreadId(void)
Definition: thread-private.h:120
SetImageProfile
MagickExport MagickBooleanType SetImageProfile(Image *, const char *, const StringInfo *)
DeleteNodeFromSplayTree
MagickExport MagickBooleanType DeleteNodeFromSplayTree(SplayTreeInfo *splay_tree, const void *key)
Definition: splay-tree.c:602
SetImageColorspace
MagickExport MagickBooleanType SetImageColorspace(Image *image, const ColorspaceType colorspace)
Definition: colorspace.c:1189