MagickCore  6.9.11-60
Convert, Edit, Or Compose Bitmap Images
profile.h
Go to the documentation of this file.
1 /*
2  Copyright 1999-2021 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. You may
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
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 
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
_Image::colorspace
ColorspaceType colorspace
Definition: image.h:158
TAG_INTEROP_OFFSET
#define TAG_INTEROP_OFFSET
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
_Image::progress_monitor
MagickProgressMonitor progress_monitor
Definition: image.h:264
GetProfilesFromResourceBlock
static void GetProfilesFromResourceBlock(Image *image, const StringInfo *resource_block)
Definition: profile.c:1515
_Image::matte
MagickBooleanType matte
Definition: image.h:171
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:198
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:780
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:1829
_ProfileInfo::info
unsigned char * info
Definition: profile.h:36
GetImageProperty
MagickExport const char * GetImageProperty(const Image *image, const char *property)
Definition: property.c:2205
_SplayTreeInfo
Definition: splay-tree.c:83
GetNextImageProfile
MagickExport char * GetNextImageProfile(const Image *image)
Definition: profile.c:288
MagickCoreSignature
#define MagickCoreSignature
Definition: method-attribute.h:86
ProfileImageTag
#define ProfileImageTag
WriteTo8BimProfile
static void WriteTo8BimProfile(Image *, const char *, const StringInfo *)
Definition: profile.c:1405
CloneImageProfiles
MagickExport MagickBooleanType CloneImageProfiles(Image *, const Image *)
GetImageProfile
MagickExport const StringInfo * GetImageProfile(const Image *image, const char *name)
Definition: profile.c:249
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:1212
quantum-private.h
DestroyImageProfiles
MagickExport void DestroyImageProfiles(Image *)
ReadResourceLong
static const unsigned char * ReadResourceLong(const unsigned char *p, unsigned int *quantum)
Definition: profile.c:1374
WriteProfileShort
static void WriteProfileShort(const EndianType endian, const unsigned short value, unsigned char *p)
Definition: profile.c:1910
monitor.h
_Image::columns
size_t columns
Definition: image.h:174
_ProfileInfo
Definition: profile.h:28
SetPixelGreen
#define SetPixelGreen(pixel, value)
Definition: pixel-accessor.h:77
WriteResourceLong
static void WriteResourceLong(unsigned char *p, const unsigned int quantum)
Definition: profile.c:1392
ReadResourceShort
static const unsigned char * ReadResourceShort(const unsigned char *p, unsigned short *quantum)
Definition: profile.c:1384
_Image::iptc_profile
ProfileInfo iptc_profile
Definition: image.h:300
DestroyProfile
static void * DestroyProfile(void *profile)
Definition: profile.c:1362
IndexPacket
Quantum IndexPacket
Definition: pixel.h:129
resource_.h
_Image::type
ImageType type
Definition: image.h:334
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:1888
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:66
string_.h
ReadProfileMSBShort
static signed short ReadProfileMSBShort(unsigned char **p, size_t *length)
Definition: profile.c:1874
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:205
RemoveImageProfile
MagickExport StringInfo * RemoveImageProfile(Image *, const char *)
Definition: profile.c:1263
SetImageProfileInternal
static MagickBooleanType SetImageProfileInternal(Image *, const char *, const StringInfo *, const MagickBooleanType)
Definition: profile.c:1693
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
AcquireStringInfo
MagickExport StringInfo * AcquireStringInfo(const size_t length)
Definition: string.c:184
CloneImageProfiles
MagickExport MagickBooleanType CloneImageProfiles(Image *image, const Image *clone_image)
Definition: profile.c:122
EndianType
EndianType
Definition: quantum.h:32
thread-private.h
hashmap.h
ReadProfileMSBLong
static signed int ReadProfileMSBLong(unsigned char **p, size_t *length)
Definition: profile.c:1861
TraceEvent
@ TraceEvent
Definition: log.h:38
ReadProfileByte
static int ReadProfileByte(unsigned char **p, size_t *length)
Definition: profile.c:1789
DestroyPixelThreadSet
static DoublePixelPacket ** DestroyPixelThreadSet(DoublePixelPacket **pixels)
Definition: quantize.c:1393
ResetImageProfileIterator
MagickExport void ResetImageProfileIterator(const Image *image)
Definition: profile.c:1320
ImageWarning
@ ImageWarning
Definition: exception.h:46
LocaleNCompare
MagickExport int LocaleNCompare(const char *p, const char *q, const size_t length)
Definition: locale.c:1570
AcquirePixelThreadSet
static DoublePixelPacket ** AcquirePixelThreadSet(const size_t count)
Definition: quantize.c:1406
_Image
Definition: image.h:153
SetStringInfoDatum
MagickExport void SetStringInfoDatum(StringInfo *string_info, const unsigned char *source)
Definition: string.c:1681
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
_Image::rendering_intent
RenderingIntent rendering_intent
Definition: image.h:192
_StringInfo::datum
unsigned char * datum
Definition: string_.h:35
LocaleCompare
MagickExport int LocaleCompare(const char *p, const char *q)
Definition: locale.c:1435
GetNextImageProfile
MagickExport char * GetNextImageProfile(const Image *)
Definition: profile.c:288
ColorspaceType
ColorspaceType
Definition: colorspace.h:26
attribute.h
option-private.h
SetImageProfile
MagickExport MagickBooleanType SetImageProfile(Image *image, const char *name, const StringInfo *profile)
Definition: profile.c:1759
SyncImageProfiles
MagickExport MagickBooleanType SyncImageProfiles(Image *image)
Definition: profile.c:2216
ResolutionType
ResolutionType
Definition: image.h:91
_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
MagickFalse
@ MagickFalse
Definition: magick-type.h:204
SetLCMSPixel
#define SetLCMSPixel(target_info, pixel)
MagickProgressMonitor
MagickBooleanType(* MagickProgressMonitor)(const char *, const MagickOffsetType, const MagickSizeType, void *)
Definition: monitor.h:26
GetValueFromSplayTree
MagickExport const void * GetValueFromSplayTree(SplayTreeInfo *splay_tree, const void *key)
Definition: splay-tree.c:920
GetPixelBlue
#define GetPixelBlue(pixel)
Definition: pixel-accessor.h:38
EXIF_NUM_FORMATS
#define EXIF_NUM_FORMATS
image.h
GetNextKeyInSplayTree
MagickExport const void * GetNextKeyInSplayTree(SplayTreeInfo *splay_tree)
Definition: splay-tree.c:768
ResetImageProfileIterator
MagickExport void ResetImageProfileIterator(const Image *)
Definition: profile.c:1320
ProfileImage
MagickExport MagickBooleanType ProfileImage(Image *, const char *, const void *, const size_t, const MagickBooleanType)
LocaleLower
MagickExport void LocaleLower(char *string)
Definition: locale.c:1490
_ProfileInfo::signature
size_t signature
Definition: profile.h:39
_Image::black_point_compensation
MagickBooleanType black_point_compensation
Definition: image.h:318
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:169
CMYKColorspace
@ CMYKColorspace
Definition: colorspace.h:39
RelativeIntent
@ RelativeIntent
Definition: profile.h:48
_Image::rows
size_t rows
Definition: image.h:175
DeleteImageProfile
MagickExport MagickBooleanType DeleteImageProfile(Image *, const char *)
cache.h
ConstantString
MagickExport char * ConstantString(const char *source)
Definition: string.c:698
Sync8BimProfile
static MagickBooleanType Sync8BimProfile(Image *image, StringInfo *profile)
Definition: profile.c:1928
MaxDirectoryStack
#define MaxDirectoryStack
_Image::signature
size_t signature
Definition: image.h:307
MagickBooleanType
MagickBooleanType
Definition: magick-type.h:203
ValidateXMPProfile
static MagickBooleanType ValidateXMPProfile(Image *image, const StringInfo *profile)
Definition: profile.c:1683
RelinquishMagickMemory
MagickExport void * RelinquishMagickMemory(void *memory)
Definition: memory.c:1162
LSBEndian
@ LSBEndian
Definition: quantum.h:34
_ExceptionInfo
Definition: exception.h:103
SyncExifProfile
static MagickBooleanType SyncExifProfile(Image *image, StringInfo *profile)
Definition: profile.c:1990
SetPixelIndex
#define SetPixelIndex(indexes, value)
Definition: pixel-accessor.h:78
studio.h
GetLCMSPixel
#define GetLCMSPixel(source_info, pixel)
monitor-private.h
ReadResourceByte
static const unsigned char * ReadResourceByte(const unsigned char *p, unsigned char *quantum)
Definition: profile.c:1367
_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:377
IsOptionMember
MagickExport MagickBooleanType IsOptionMember(const char *option, const char *options)
Definition: option.c:2338
GrayscaleType
@ GrayscaleType
Definition: image.h:53
ThreadResource
@ ThreadResource
Definition: resource_.h:33
CloneStringInfo
MagickExport StringInfo * CloneStringInfo(const StringInfo *string_info)
Definition: string.c:335
RenderingIntent
RenderingIntent
Definition: profile.h:43
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:1183
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:1149
exception.h
option.h
SyncImageProfiles
MagickExport MagickBooleanType SyncImageProfiles(Image *)
Definition: profile.c:2216
DestroyStringInfo
MagickExport StringInfo * DestroyStringInfo(StringInfo *string_info)
Definition: string.c:835
SetImageStorageClass
MagickExport MagickBooleanType SetImageStorageClass(Image *image, const ClassType storage_class)
Definition: image.c:2595
GetPixelGreen
#define GetPixelGreen(pixel)
Definition: pixel-accessor.h:43
_Image::color_profile
ProfileInfo color_profile
Definition: image.h:299
CopyMagickString
MagickExport size_t CopyMagickString(char *magick_restrict destination, const char *magick_restrict source, const size_t length)
Definition: string.c:751
_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:1420
DestroyImageProfiles
MagickExport void DestroyImageProfiles(Image *image)
Definition: profile.c:219
MaxTextExtent
#define MaxTextExtent
Definition: method-attribute.h:89
_Image::units
ResolutionType units
Definition: image.h:198
GetImageProfile
MagickExport const StringInfo * GetImageProfile(const Image *, const char *)
Definition: profile.c:249
string-private.h
colorspace-private.h
LabColorspace
@ LabColorspace
Definition: colorspace.h:32
token.h
SetsRGBImageProfile
static MagickBooleanType SetsRGBImageProfile(Image *image)
Definition: profile.c:488
RemoveImageProfile
MagickExport StringInfo * RemoveImageProfile(Image *image, const char *name)
Definition: profile.c:1263
_StringInfo
Definition: string_.h:30
MissingDelegateWarning
@ MissingDelegateWarning
Definition: exception.h:36
GetMagickResourceLimit
MagickExport MagickSizeType GetMagickResourceLimit(const ResourceType type)
Definition: resource.c:842
_PixelPacket
Definition: pixel.h:132
ReadProfileShort
static signed short ReadProfileShort(const EndianType endian, unsigned char *buffer)
Definition: profile.c:1801
AcquireQuantumMemory
MagickExport void * AcquireQuantumMemory(const size_t count, const size_t quantum)
Definition: memory.c:665
configure.h
PerceptualIntent
@ PerceptualIntent
Definition: profile.h:46
MagickOffsetType
ssize_t MagickOffsetType
Definition: magick-type.h:139
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:1250