File indexing completed on 2025-01-30 10:11:44
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #ifndef MAGICKCORE_PIXEL_H
0019 #define MAGICKCORE_PIXEL_H
0020
0021 #include "MagickCore/colorspace.h"
0022
0023 #if defined(__cplusplus) || defined(c_plusplus)
0024 extern "C" {
0025 #endif
0026
0027 #define MaxPixelChannels 64
0028 #undef index
0029
0030
0031
0032
0033 typedef enum
0034 {
0035 UndefinedChannel = 0x0000,
0036 RedChannel = 0x0001,
0037 GrayChannel = 0x0001,
0038 CyanChannel = 0x0001,
0039 LChannel = 0x0001,
0040 GreenChannel = 0x0002,
0041 MagentaChannel = 0x0002,
0042 aChannel = 0x0002,
0043 BlueChannel = 0x0004,
0044 bChannel = 0x0002,
0045 YellowChannel = 0x0004,
0046 BlackChannel = 0x0008,
0047 AlphaChannel = 0x0010,
0048 OpacityChannel = 0x0010,
0049 IndexChannel = 0x0020,
0050 ReadMaskChannel = 0x0040,
0051 WriteMaskChannel = 0x0080,
0052 MetaChannel = 0x0100,
0053 CompositeMaskChannel = 0x0200,
0054 CompositeChannels = 0x001F,
0055 AllChannels = 0x7ffffff,
0056
0057
0058
0059
0060
0061
0062
0063 TrueAlphaChannel = 0x0100,
0064 RGBChannels = 0x0200,
0065 GrayChannels = 0x0400,
0066 SyncChannels = 0x20000,
0067 DefaultChannels = AllChannels
0068 } ChannelType;
0069
0070 typedef enum
0071 {
0072 UndefinedPixelChannel = 0,
0073 RedPixelChannel = 0,
0074 CyanPixelChannel = 0,
0075 GrayPixelChannel = 0,
0076 LPixelChannel = 0,
0077 LabelPixelChannel = 0,
0078 YPixelChannel = 0,
0079 aPixelChannel = 1,
0080 GreenPixelChannel = 1,
0081 MagentaPixelChannel = 1,
0082 CbPixelChannel = 1,
0083 bPixelChannel = 2,
0084 BluePixelChannel = 2,
0085 YellowPixelChannel = 2,
0086 CrPixelChannel = 2,
0087 BlackPixelChannel = 3,
0088 AlphaPixelChannel = 4,
0089 IndexPixelChannel = 5,
0090 ReadMaskPixelChannel = 6,
0091 WriteMaskPixelChannel = 7,
0092 MetaPixelChannel = 8,
0093 CompositeMaskPixelChannel = 9,
0094 MetaPixelChannels = 10,
0095 IntensityPixelChannel = MaxPixelChannels,
0096 CompositePixelChannel = MaxPixelChannels,
0097 SyncPixelChannel = MaxPixelChannels+1
0098 } PixelChannel;
0099
0100 typedef enum
0101 {
0102 UndefinedPixelIntensityMethod = 0,
0103 AveragePixelIntensityMethod,
0104 BrightnessPixelIntensityMethod,
0105 LightnessPixelIntensityMethod,
0106 MSPixelIntensityMethod,
0107 Rec601LumaPixelIntensityMethod,
0108 Rec601LuminancePixelIntensityMethod,
0109 Rec709LumaPixelIntensityMethod,
0110 Rec709LuminancePixelIntensityMethod,
0111 RMSPixelIntensityMethod
0112 } PixelIntensityMethod;
0113
0114 typedef enum
0115 {
0116 UndefinedInterpolatePixel,
0117 AverageInterpolatePixel,
0118 Average9InterpolatePixel,
0119 Average16InterpolatePixel,
0120 BackgroundInterpolatePixel,
0121 BilinearInterpolatePixel,
0122 BlendInterpolatePixel,
0123 CatromInterpolatePixel,
0124 IntegerInterpolatePixel,
0125 MeshInterpolatePixel,
0126 NearestInterpolatePixel,
0127 SplineInterpolatePixel
0128 } PixelInterpolateMethod;
0129
0130 typedef enum
0131 {
0132 UndefinedPixelMask = 0x000000,
0133 ReadPixelMask = 0x000001,
0134 WritePixelMask = 0x000002,
0135 CompositePixelMask = 0x000004
0136 } PixelMask;
0137
0138 typedef enum
0139 {
0140 UndefinedPixelTrait = 0x000000,
0141 CopyPixelTrait = 0x000001,
0142 UpdatePixelTrait = 0x000002,
0143 BlendPixelTrait = 0x000004
0144 } PixelTrait;
0145
0146 typedef enum
0147 {
0148 UndefinedPixel,
0149 CharPixel,
0150 DoublePixel,
0151 FloatPixel,
0152 LongPixel,
0153 LongLongPixel,
0154 QuantumPixel,
0155 ShortPixel
0156 } StorageType;
0157
0158
0159
0160
0161 typedef struct _PixelChannelMap
0162 {
0163 PixelChannel
0164 channel;
0165
0166 PixelTrait
0167 traits;
0168
0169 ssize_t
0170 offset;
0171 } PixelChannelMap;
0172
0173 typedef struct _PixelInfo
0174 {
0175 ClassType
0176 storage_class;
0177
0178 ColorspaceType
0179 colorspace;
0180
0181 PixelTrait
0182 alpha_trait;
0183
0184 double
0185 fuzz;
0186
0187 size_t
0188 depth;
0189
0190 MagickSizeType
0191 count;
0192
0193 MagickRealType
0194 red,
0195 green,
0196 blue,
0197 black,
0198 alpha,
0199 index;
0200 } PixelInfo;
0201
0202 typedef struct _PixelPacket
0203 {
0204 unsigned int
0205 red,
0206 green,
0207 blue,
0208 alpha,
0209 black;
0210 } PixelPacket;
0211
0212 typedef struct _CacheView
0213 CacheView_;
0214
0215
0216
0217
0218 extern MagickExport ChannelType
0219 SetPixelChannelMask(Image *,const ChannelType);
0220
0221 extern MagickExport MagickBooleanType
0222 ExportImagePixels(const Image *,const ssize_t,const ssize_t,const size_t,
0223 const size_t,const char *,const StorageType,void *,ExceptionInfo *),
0224 ImportImagePixels(Image *,const ssize_t,const ssize_t,const size_t,
0225 const size_t,const char *,const StorageType,const void *,ExceptionInfo *),
0226 InterpolatePixelChannel(const Image *magick_restrict,const CacheView_ *,
0227 const PixelChannel,const PixelInterpolateMethod,const double,const double,
0228 double *,ExceptionInfo *),
0229 InterpolatePixelChannels(const Image *magick_restrict,const CacheView_ *,
0230 const Image * magick_restrict,const PixelInterpolateMethod,const double,
0231 const double,Quantum *,ExceptionInfo *),
0232 InterpolatePixelInfo(const Image *,const CacheView_ *,
0233 const PixelInterpolateMethod,const double,const double,PixelInfo *,
0234 ExceptionInfo *),
0235 IsFuzzyEquivalencePixel(const Image *,const Quantum *,const Image *,
0236 const Quantum *) magick_attribute((__pure__)),
0237 IsFuzzyEquivalencePixelInfo(const PixelInfo *,const PixelInfo *)
0238 magick_attribute((__pure__)),
0239 SetPixelMetaChannels(Image *,const size_t,ExceptionInfo *),
0240 SortImagePixels(Image *,ExceptionInfo *);
0241
0242 extern MagickExport MagickRealType
0243 GetPixelInfoIntensity(const Image *magick_restrict,
0244 const PixelInfo *magick_restrict) magick_hot_spot,
0245 GetPixelIntensity(const Image *magick_restrict,
0246 const Quantum *magick_restrict) magick_hot_spot;
0247
0248 extern MagickExport PixelChannelMap
0249 *AcquirePixelChannelMap(void),
0250 *ClonePixelChannelMap(PixelChannelMap *),
0251 *DestroyPixelChannelMap(PixelChannelMap *);
0252
0253 extern MagickExport PixelInfo
0254 *ClonePixelInfo(const PixelInfo *);
0255
0256 extern MagickExport MagickRealType
0257 DecodePixelGamma(const MagickRealType) magick_hot_spot,
0258 EncodePixelGamma(const MagickRealType) magick_hot_spot;
0259
0260 extern MagickExport void
0261 ConformPixelInfo(Image *,const PixelInfo *,PixelInfo *,ExceptionInfo *),
0262 GetPixelInfo(const Image *,PixelInfo *),
0263 InitializePixelChannelMap(Image *);
0264
0265 #if defined(__cplusplus) || defined(c_plusplus)
0266 }
0267 #endif
0268
0269 #endif