github.com/kaydxh/golang@v0.0.131/pkg/gocv/cgo/third_path/graphics-magick/include/GraphicsMagick/magick/magick.h (about) 1 /* 2 Copyright (C) 2003 - 2020 GraphicsMagick Group 3 Copyright (C) 2002 ImageMagick Studio 4 Copyright 1991-1999 E. I. du Pont de Nemours and Company 5 6 This program is covered by multiple licenses, which are described in 7 Copyright.txt. You should have received a copy of Copyright.txt with this 8 package; otherwise see http://www.graphicsmagick.org/www/Copyright.html. 9 10 GraphicsMagick Application Programming Interface declarations. 11 */ 12 #ifndef _MAGICK_MAGICK_H 13 #define _MAGICK_MAGICK_H 14 15 #if defined(__cplusplus) || defined(c_plusplus) 16 extern "C" { 17 #endif 18 19 /* 20 Flags to form options passed to InitializeMagickEx 21 */ 22 #define MAGICK_OPT_NO_SIGNAL_HANDER 0x0001 /* Don't register ANSI/POSIX signal handlers */ 23 24 typedef Image 25 *(*DecoderHandler)(const ImageInfo *,ExceptionInfo *); 26 27 typedef unsigned int 28 (*EncoderHandler)(const ImageInfo *,Image *), 29 (*MagickHandler)(const unsigned char *,const size_t); 30 31 /* 32 Stability and usefulness of the coder. 33 */ 34 typedef enum 35 { 36 BrokenCoderClass = -1, /* Known to sometimes/often not work properly or 37 might not be useful at all */ 38 UnstableCoderClass = 0, /* Weak implementation, poorly designed file 39 format, and/or hardly ever used */ 40 StableCoderClass, /* Well maintained, but not often used */ 41 PrimaryCoderClass /* Well maintained and commonly used */ 42 } CoderClass; 43 44 /* 45 How the file extension should be treated (e.g. in SetImageInfo()). 46 */ 47 typedef enum 48 { 49 HintExtensionTreatment = 0, /* Extension is a useful hint to indicate format */ 50 ObeyExtensionTreatment, /* Extension must be obeyed as format indicator */ 51 IgnoreExtensionTreatment /* Format has no associated extension */ 52 } ExtensionTreatment; 53 54 typedef struct _MagickInfo 55 { 56 struct _MagickInfo 57 *next, /* private, next member in list */ 58 *previous; /* private, previous member in list */ 59 60 const char 61 *name; /* format ID ("magick") */ 62 63 const char 64 *description, /* format description */ 65 *note, /* usage note for user */ 66 *version, /* support library version */ 67 *module; /* name of loadable module */ 68 69 DecoderHandler 70 decoder; /* function vector to decoding routine */ 71 72 EncoderHandler 73 encoder; /* function vector to encoding routine */ 74 75 MagickHandler 76 magick; /* function vector to format test routine */ 77 78 void 79 *client_data; /* arbitrary user supplied data */ 80 81 MagickBool 82 adjoin, /* coder may read/write multiple frames (default True) */ 83 raw, /* coder requires that size be set (default False) */ 84 stealth, /* coder should not appear in formats listing (default MagickFalse) */ 85 seekable_stream, /* coder requires BLOB "seek" and "tell" APIs (default MagickFalse) 86 * Note that SetImageInfo() currently always copies input 87 * from a pipe, .gz, or .bz2 file, to a temporary file so 88 * that it can retrieve a bit of the file header in order to 89 * support the file header magic logic. 90 */ 91 blob_support, /* coder uses BLOB APIs (default True) */ 92 thread_support; /* coder is thread safe (default True) */ 93 94 CoderClass 95 coder_class; /* Coder usefulness/stability level */ 96 97 ExtensionTreatment 98 extension_treatment; /* How much faith should be placed on file extension? */ 99 100 unsigned long 101 signature; /* private, structure validator */ 102 103 } MagickInfo; 104 105 /* 106 Magick method declaractions. 107 */ 108 extern MagickExport char 109 *MagickToMime(const char *magick); 110 111 extern MagickExport const char 112 *GetImageMagick(const unsigned char *magick,const size_t length); 113 114 extern MagickExport MagickBool 115 IsMagickConflict(const char *magick) MAGICK_FUNC_PURE; 116 117 extern MagickExport MagickPassFail 118 ListModuleMap(FILE *file,ExceptionInfo *exception), 119 ListMagickInfo(FILE *file,ExceptionInfo *exception), 120 InitializeMagickEx(const char *path, unsigned int options, 121 ExceptionInfo *exception), 122 UnregisterMagickInfo(const char *name); 123 124 extern MagickExport void 125 DestroyMagick(void), 126 InitializeMagick(const char *path), 127 PanicDestroyMagick(void); 128 129 extern MagickExport const MagickInfo 130 *GetMagickInfo(const char *name,ExceptionInfo *exception); 131 132 extern MagickExport MagickInfo 133 **GetMagickInfoArray(ExceptionInfo *exception); 134 135 extern MagickExport MagickInfo 136 *RegisterMagickInfo(MagickInfo *magick_info), 137 *SetMagickInfo(const char *name); 138 139 #if defined(MAGICK_IMPLEMENTATION) 140 # include "magick/magick-private.h" 141 #endif /* defined(MAGICK_IMPLEMENTATION) */ 142 143 144 #if defined(__cplusplus) || defined(c_plusplus) 145 } 146 #endif 147 148 #endif /* _MAGICK_MAGICK_H */ 149 150 /* 151 * Local Variables: 152 * mode: c 153 * c-basic-offset: 2 154 * fill-column: 78 155 * End: 156 */