github.com/kaydxh/golang@v0.0.131/pkg/gocv/cgo/third_path/graphics-magick/include/GraphicsMagick/magick/constitute.h (about) 1 /* 2 Copyright (C) 2003 - 2020 GraphicsMagick Group 3 Copyright (C) 2002 ImageMagick Studio 4 5 This program is covered by multiple licenses, which are described in 6 Copyright.txt. You should have received a copy of Copyright.txt with this 7 package; otherwise see http://www.graphicsmagick.org/www/Copyright.html. 8 9 GraphicsMagick Constitute Methods. 10 */ 11 #ifndef _MAGICK_CONSTITUTE_H 12 #define _MAGICK_CONSTITUTE_H 13 14 #if defined(__cplusplus) || defined(c_plusplus) 15 extern "C" { 16 #endif /* defined(__cplusplus) || defined(c_plusplus) */ 17 18 /* 19 Quantum import/export types as used by ImportImagePixelArea() and 20 ExportImagePixelArea(). Values are imported or exported in network 21 byte order ("big endian") by default, but little endian may be 22 selected via the 'endian' option in ExportPixelAreaOptions and 23 ImportPixelAreaOptions. 24 */ 25 typedef enum 26 { 27 UndefinedQuantum, /* Not specified */ 28 IndexQuantum, /* Colormap indexes */ 29 GrayQuantum, /* Grayscale values (minimum value is black) */ 30 IndexAlphaQuantum, /* Colormap indexes with transparency */ 31 GrayAlphaQuantum, /* Grayscale values with transparency */ 32 RedQuantum, /* Red values only (RGBA) */ 33 CyanQuantum, /* Cyan values only (CMYKA) */ 34 GreenQuantum, /* Green values only (RGBA) */ 35 YellowQuantum, /* Yellow values only (CMYKA) */ 36 BlueQuantum, /* Blue values only (RGBA) */ 37 MagentaQuantum, /* Magenta values only (CMYKA) */ 38 AlphaQuantum, /* Transparency values (RGBA or CMYKA) */ 39 BlackQuantum, /* Black values only (CMYKA) */ 40 RGBQuantum, /* Red, green, and blue values */ 41 RGBAQuantum, /* Red, green, blue, and transparency values */ 42 CMYKQuantum, /* Cyan, magenta, yellow, and black values */ 43 CMYKAQuantum, /* Cyan, magenta, yellow, black, and transparency values */ 44 CIEYQuantum, /* CIE Y values, based on CCIR-709 primaries */ 45 CIEXYZQuantum /* CIE XYZ values, based on CCIR-709 primaries */ 46 } QuantumType; 47 48 /* 49 Quantum sample type for when exporting/importing a pixel area. 50 */ 51 typedef enum 52 { 53 UndefinedQuantumSampleType, /* Not specified */ 54 UnsignedQuantumSampleType, /* Unsigned integral type (1-32 or 64 bits) */ 55 FloatQuantumSampleType /* Floating point type (16, 24, 32, or 64 bit) */ 56 } QuantumSampleType; 57 58 /* 59 Quantum size types as used by ConstituteImage() and DispatchImage()/ 60 */ 61 typedef enum 62 { 63 CharPixel, /* Unsigned 8 bit 'unsigned char' */ 64 ShortPixel, /* Unsigned 16 bit 'unsigned short int' */ 65 IntegerPixel, /* Unsigned 32 bit 'unsigned int' */ 66 LongPixel, /* Unsigned 32 or 64 bit (CPU dependent) 'unsigned long' */ 67 FloatPixel, /* Floating point 32-bit 'float' */ 68 DoublePixel /* Floating point 64-bit 'double' */ 69 } StorageType; 70 71 /* 72 Additional options for ExportImagePixelArea() 73 */ 74 typedef struct _ExportPixelAreaOptions 75 { 76 QuantumSampleType 77 sample_type; /* Quantum sample type */ 78 79 double 80 double_minvalue, /* Minimum value (default 0.0) for linear floating point samples */ 81 double_maxvalue; /* Maximum value (default 1.0) for linear floating point samples */ 82 83 MagickBool 84 grayscale_miniswhite; /* Grayscale minimum value is white rather than black */ 85 86 unsigned long 87 pad_bytes; /* Number of pad bytes to output after pixel data */ 88 89 unsigned char 90 pad_value; /* Value to use when padding end of pixel data */ 91 92 EndianType 93 endian; /* Endian orientation for 16/32/64 bit types (default MSBEndian) */ 94 95 unsigned long 96 signature; 97 } ExportPixelAreaOptions; 98 99 /* 100 Optional results info for ExportImagePixelArea() 101 */ 102 typedef struct _ExportPixelAreaInfo 103 { 104 size_t 105 bytes_exported; /* Number of bytes which were exported */ 106 107 } ExportPixelAreaInfo; 108 109 /* 110 Additional options for ImportImagePixelArea() 111 */ 112 typedef struct _ImportPixelAreaOptions 113 { 114 QuantumSampleType 115 sample_type; /* Quantum sample type */ 116 117 double 118 double_minvalue, /* Minimum value (default 0.0) for linear floating point samples */ 119 double_maxvalue; /* Maximum value (default 1.0) for linear floating point samples */ 120 121 MagickBool 122 grayscale_miniswhite; /* Grayscale minimum value is white rather than black */ 123 124 EndianType 125 endian; /* Endian orientation for 16/32/64 bit types (default MSBEndian) */ 126 127 unsigned long 128 signature; 129 } ImportPixelAreaOptions; 130 131 /* 132 Optional results info for ImportImagePixelArea() 133 */ 134 typedef struct _ImportPixelAreaInfo 135 { 136 size_t 137 bytes_imported; /* Number of bytes which were imported */ 138 139 } ImportPixelAreaInfo; 140 141 extern MagickExport const char 142 *StorageTypeToString(const StorageType storage_type), 143 *QuantumSampleTypeToString(const QuantumSampleType sample_type), 144 *QuantumTypeToString(const QuantumType quantum_type); 145 146 extern MagickExport Image 147 *ConstituteImage(const unsigned long width,const unsigned long height, 148 const char *map,const StorageType type,const void *pixels, 149 ExceptionInfo *exception), 150 *ConstituteTextureImage(const unsigned long columns,const unsigned long rows, 151 const Image *texture,ExceptionInfo *exception), 152 *PingImage(const ImageInfo *image_info,ExceptionInfo *exception), 153 *ReadImage(const ImageInfo *image_info,ExceptionInfo *exception), 154 *ReadInlineImage(const ImageInfo *image_info,const char *content, 155 ExceptionInfo *exception); 156 157 extern MagickExport MagickPassFail 158 DispatchImage(const Image *image,const long x_offset,const long y_offset, 159 const unsigned long columns,const unsigned long rows,const char *map, 160 const StorageType type,void *pixels,ExceptionInfo *exception), 161 ExportImagePixelArea(const Image *image,const QuantumType quantum_type, 162 const unsigned int quantum_size,unsigned char *destination, 163 const ExportPixelAreaOptions *options,ExportPixelAreaInfo *export_info), 164 ExportViewPixelArea(const ViewInfo *view,const QuantumType quantum_type, 165 const unsigned int quantum_size,unsigned char *destination, 166 const ExportPixelAreaOptions *options,ExportPixelAreaInfo *export_info); 167 168 extern MagickExport MagickPassFail 169 ImportImagePixelArea(Image *image,const QuantumType quantum_type, 170 const unsigned int quantum_size,const unsigned char *source, 171 const ImportPixelAreaOptions *options,ImportPixelAreaInfo *import_info), 172 ImportViewPixelArea(ViewInfo *view,const QuantumType quantum_type, 173 const unsigned int quantum_size,const unsigned char *source, 174 const ImportPixelAreaOptions *options,ImportPixelAreaInfo *import_info), 175 WriteImage(const ImageInfo *image_info,Image *image), 176 WriteImages(const ImageInfo *image_info,Image *image,const char *filename, 177 ExceptionInfo *exception), 178 WriteImagesFile(const ImageInfo *image_info,Image *image,FILE * file, 179 ExceptionInfo *exception); 180 181 extern MagickExport void 182 ExportPixelAreaOptionsInit(ExportPixelAreaOptions *options), 183 ImportPixelAreaOptionsInit(ImportPixelAreaOptions *options); 184 185 extern MagickExport MagickPassFail 186 MagickFindRawImageMinMax(Image *image, EndianType endian, 187 unsigned long width, unsigned long height,StorageType type, 188 unsigned scanline_octets, void *scanline_buffer, 189 double *min, double *max); 190 191 extern MagickExport unsigned int 192 MagickGetQuantumSamplesPerPixel(const QuantumType quantum_type) MAGICK_FUNC_CONST; 193 194 #if defined(MAGICK_IMPLEMENTATION) 195 # include "magick/constitute-private.h" 196 #endif /* defined(MAGICK_IMPLEMENTATION) */ 197 198 #if defined(__cplusplus) || defined(c_plusplus) 199 } 200 #endif /* defined(__cplusplus) || defined(c_plusplus) */ 201 202 #endif /* _MAGICK_CONSTITUTE_H */ 203 204 /* 205 * Local Variables: 206 * mode: c 207 * c-basic-offset: 2 208 * fill-column: 78 209 * End: 210 */