1 2 3 4 5 <!DOCTYPE html> 6 <html lang="en"> 7 <head> 8 <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" /> 9 <title>ImageMagick: MagickCore, C API for ImageMagick: Loadable Modules</title> 10 <meta http-equiv="content-type" content="text/html; charset=utf-8"/> 11 <meta name="application-name" content="ImageMagick"/> 12 <meta name="description" content="ImageMagick is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bzier curves."/> 13 <meta name="application-url" content="http://www.imagemagick.org"/> 14 <meta name="generator" content="PHP"/> 15 <meta name="keywords" content="magickcore, c, api, for, imagemagick:, loadable, modules, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert"/> 16 <meta name="rating" content="GENERAL"/> 17 <meta name="robots" content="INDEX, FOLLOW"/> 18 <meta name="generator" content="ImageMagick Studio LLC"/> 19 <meta name="author" content="ImageMagick Studio LLC"/> 20 <meta name="revisit-after" content="2 DAYS"/> 21 <meta name="resource-type" content="document"/> 22 <meta name="copyright" content="Copyright (c) 1999-2016 ImageMagick Studio LLC"/> 23 <meta name="distribution" content="Global"/> 24 <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1"/> 25 <link rel="icon" href="../image/wand.png"/> 26 <link rel="shortcut icon" href="../image/wand.ico"/> 27 <link rel="stylesheet" href="../css/magick.php"/> 28 </head> 29 <body> 30 <div class="main"> 31 <div class="magick-masthead"> 32 <div class="container"> 33 <script async="async" src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" 34 style="display:block" 35 data-ad-client="ca-pub-3129977114552745" 36 data-ad-slot="6345125851" 37 data-ad-format="auto"></ins> 38 <script> 39 (adsbygoogle = window.adsbygoogle || []).push({}); 40 </script> 41 <nav class="magick-nav"> 42 <a class="magick-nav-item " href="../index.php">Home</a> 43 <a class="magick-nav-item " href="../script/binary-releases.php">Download</a> 44 <a class="magick-nav-item " href="../script/command-line-tools.php">Tools</a> 45 <a class="magick-nav-item " href="../script/command-line-options.php">Options</a> 46 <a class="magick-nav-item " href="../script/resources.php">Resources</a> 47 <a class="magick-nav-item " href="../script/api.php">Develop</a> 48 <a class="magick-nav-item " href="../script/search.php">Search</a> 49 <a class="magick-nav-item pull-right" href="http://www.imagemagick.org/discourse-server/">Community</a> 50 </nav> 51 </div> 52 </div> 53 <div class="container"> 54 <div class="magick-header"> 55 <p class="text-center"><a href="module.php#AcquireModuleInfo">AcquireModuleInfo</a> • <a href="module.php#DestroyModuleList">DestroyModuleList</a> • <a href="module.php#GetModuleInfo">GetModuleInfo</a> • <a href="module.php#GetModuleInfoList">GetModuleInfoList</a> • <a href="module.php#GetModuleList">GetModuleList</a> • <a href="module.php#GetMagickModulePath">GetMagickModulePath</a> • <a href="module.php#IsModuleTreeInstantiated">IsModuleTreeInstantiated</a> • <a href="module.php#InvokeDynamicImageFilter">InvokeDynamicImageFilter</a> • <a href="module.php#ListModuleInfo">ListModuleInfo</a> • <a href="module.php#OpenModule">OpenModule</a> • <a href="module.php#OpenModules">OpenModules</a> • <a href="module.php#RegisterModule">RegisterModule</a> • <a href="module.php#TagToCoderModuleName">TagToCoderModuleName</a> • <a href="module.php#TagToFilterModuleName">TagToFilterModuleName</a> • <a href="module.php#TagToModuleName">TagToModuleName</a> • <a href="module.php#UnregisterModule">UnregisterModule</a></p> 56 57 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/module_8c.html" id="AcquireModuleInfo">AcquireModuleInfo</a></h2> 58 59 <p>AcquireModuleInfo() allocates the ModuleInfo structure.</p> 60 61 <p>The format of the AcquireModuleInfo method is:</p> 62 63 <pre class="text"> 64 ModuleInfo *AcquireModuleInfo(const char *path,const char *tag) 65 </pre> 66 67 <p>A description of each parameter follows:</p> 68 69 <dd> 70 </dd> 71 72 <dd> </dd> 73 <dl class="dl-horizontal"> 74 <dt>path</dt> 75 <dd>the path associated with the tag. </dd> 76 77 <dd> </dd> 78 <dt>tag</dt> 79 <dd>a character string that represents the image format we are looking for. </dd> 80 81 <dd> </dd> 82 </dl> 83 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/module_8c.html" id="DestroyModuleList">DestroyModuleList</a></h2> 84 85 <p>DestroyModuleList() unregisters any previously loaded modules and exits the module loaded environment.</p> 86 87 <p>The format of the DestroyModuleList module is:</p> 88 89 <pre class="text"> 90 void DestroyModuleList(void) 91 </pre> 92 93 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/module_8c.html" id="GetModuleInfo">GetModuleInfo</a></h2> 94 95 <p>GetModuleInfo() returns a pointer to a ModuleInfo structure that matches the specified tag. If tag is NULL, the head of the module list is returned. If no modules are loaded, or the requested module is not found, NULL is returned.</p> 96 97 <p>The format of the GetModuleInfo module is:</p> 98 99 <pre class="text"> 100 ModuleInfo *GetModuleInfo(const char *tag,ExceptionInfo *exception) 101 </pre> 102 103 <p>A description of each parameter follows:</p> 104 105 <dd> 106 </dd> 107 108 <dd> </dd> 109 <dl class="dl-horizontal"> 110 <dt>tag</dt> 111 <dd>a character string that represents the image format we are looking for. </dd> 112 113 <dd> </dd> 114 <dt>exception</dt> 115 <dd>return any errors or warnings in this structure. </dd> 116 117 <dd> </dd> 118 </dl> 119 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/module_8c.html" id="GetModuleInfoList">GetModuleInfoList</a></h2> 120 121 <p>GetModuleInfoList() returns any modules that match the specified pattern.</p> 122 123 <p>The format of the GetModuleInfoList function is:</p> 124 125 <pre class="text"> 126 const ModuleInfo **GetModuleInfoList(const char *pattern, 127 size_t *number_modules,ExceptionInfo *exception) 128 </pre> 129 130 <p>A description of each parameter follows:</p> 131 132 <dd> 133 </dd> 134 135 <dd> </dd> 136 <dl class="dl-horizontal"> 137 <dt>pattern</dt> 138 <dd>Specifies a pointer to a text string containing a pattern. </dd> 139 140 <dd> </dd> 141 <dt>number_modules</dt> 142 <dd> This integer returns the number of modules in the list. </dd> 143 144 <dd> </dd> 145 <dt>exception</dt> 146 <dd>return any errors or warnings in this structure. </dd> 147 148 <dd> </dd> 149 </dl> 150 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/module_8c.html" id="GetModuleList">GetModuleList</a></h2> 151 152 <p>GetModuleList() returns any image format modules that match the specified pattern.</p> 153 154 <p>The format of the GetModuleList function is:</p> 155 156 <pre class="text"> 157 char **GetModuleList(const char *pattern,const MagickModuleType type, 158 size_t *number_modules,ExceptionInfo *exception) 159 </pre> 160 161 <p>A description of each parameter follows:</p> 162 163 <dd> 164 </dd> 165 166 <dd> </dd> 167 <dl class="dl-horizontal"> 168 <dt>pattern</dt> 169 <dd>Specifies a pointer to a text string containing a pattern. </dd> 170 171 <dd> </dd> 172 <dt>type</dt> 173 <dd>choose from MagickImageCoderModule or MagickImageFilterModule. </dd> 174 175 <dd> </dd> 176 <dt>number_modules</dt> 177 <dd> This integer returns the number of modules in the list. </dd> 178 179 <dd> </dd> 180 <dt>exception</dt> 181 <dd>return any errors or warnings in this structure. </dd> 182 183 <dd> </dd> 184 </dl> 185 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/module_8c.html" id="GetMagickModulePath">GetMagickModulePath</a></h2> 186 187 <p>GetMagickModulePath() finds a module with the specified module type and filename.</p> 188 189 <p>The format of the GetMagickModulePath module is:</p> 190 191 <pre class="text"> 192 MagickBooleanType GetMagickModulePath(const char *filename, 193 MagickModuleType module_type,char *path,ExceptionInfo *exception) 194 </pre> 195 196 <p>A description of each parameter follows:</p> 197 198 <dd> 199 </dd> 200 201 <dd> </dd> 202 <dl class="dl-horizontal"> 203 <dt>filename</dt> 204 <dd>the module file name. </dd> 205 206 <dd> </dd> 207 <dt>module_type</dt> 208 <dd>the module type: MagickImageCoderModule or MagickImageFilterModule. </dd> 209 210 <dd> </dd> 211 <dt>path</dt> 212 <dd>the path associated with the filename. </dd> 213 214 <dd> </dd> 215 <dt>exception</dt> 216 <dd>return any errors or warnings in this structure. </dd> 217 218 <dd> </dd> 219 </dl> 220 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/module_8c.html" id="IsModuleTreeInstantiated">IsModuleTreeInstantiated</a></h2> 221 222 <p>IsModuleTreeInstantiated() determines if the module tree is instantiated. If not, it instantiates the tree and returns it.</p> 223 224 <p>The format of the IsModuleTreeInstantiated() method is:</p> 225 226 <pre class="text"> 227 IsModuleTreeInstantiated(Exceptioninfo *exception) 228 </pre> 229 230 <p>A description of each parameter follows.</p> 231 232 <dt>exception</dt> 233 <p>return any errors or warnings in this structure.</p> 234 235 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/module_8c.html" id="InvokeDynamicImageFilter">InvokeDynamicImageFilter</a></h2> 236 237 <p>InvokeDynamicImageFilter() invokes a dynamic image filter.</p> 238 239 <p>The format of the InvokeDynamicImageFilter module is:</p> 240 241 <pre class="text"> 242 MagickBooleanType InvokeDynamicImageFilter(const char *tag,Image **image, 243 const int argc,const char **argv,ExceptionInfo *exception) 244 </pre> 245 246 <p>A description of each parameter follows:</p> 247 248 <dd> 249 </dd> 250 251 <dd> </dd> 252 <dl class="dl-horizontal"> 253 <dt>tag</dt> 254 <dd>a character string that represents the name of the particular module. </dd> 255 256 <dd> </dd> 257 <dt>image</dt> 258 <dd>the image. </dd> 259 260 <dd> </dd> 261 <dt>argc</dt> 262 <dd>a pointer to an integer describing the number of elements in the argument vector. </dd> 263 264 <dd> </dd> 265 <dt>argv</dt> 266 <dd>a pointer to a text array containing the command line arguments. </dd> 267 268 <dd> </dd> 269 <dt>exception</dt> 270 <dd>return any errors or warnings in this structure. </dd> 271 272 <dd> </dd> 273 </dl> 274 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/module_8c.html" id="ListModuleInfo">ListModuleInfo</a></h2> 275 276 <p>ListModuleInfo() lists the module info to a file.</p> 277 278 <p>The format of the ListModuleInfo module is:</p> 279 280 <pre class="text"> 281 MagickBooleanType ListModuleInfo(FILE *file,ExceptionInfo *exception) 282 </pre> 283 284 <p>A description of each parameter follows.</p> 285 286 <dt>file</dt> 287 <p>An pointer to a FILE.</p> 288 289 <dt>exception</dt> 290 <p>return any errors or warnings in this structure.</p> 291 292 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/module_8c.html" id="OpenModule">OpenModule</a></h2> 293 294 <p>OpenModule() loads a module, and invokes its registration module. It returns MagickTrue on success, and MagickFalse if there is an error.</p> 295 296 <p>The format of the OpenModule module is:</p> 297 298 <pre class="text"> 299 MagickBooleanType OpenModule(const char *module,ExceptionInfo *exception) 300 </pre> 301 302 <p>A description of each parameter follows:</p> 303 304 <dd> 305 </dd> 306 307 <dd> </dd> 308 <dl class="dl-horizontal"> 309 <dt>module</dt> 310 <dd>a character string that indicates the module to load. </dd> 311 312 <dd> </dd> 313 <dt>exception</dt> 314 <dd>return any errors or warnings in this structure. </dd> 315 316 <dd> </dd> 317 </dl> 318 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/module_8c.html" id="OpenModules">OpenModules</a></h2> 319 320 <p>OpenModules() loads all available modules.</p> 321 322 <p>The format of the OpenModules module is:</p> 323 324 <pre class="text"> 325 MagickBooleanType OpenModules(ExceptionInfo *exception) 326 </pre> 327 328 <p>A description of each parameter follows:</p> 329 330 <dd> 331 </dd> 332 333 <dd> </dd> 334 <dl class="dl-horizontal"> 335 <dt>exception</dt> 336 <dd>return any errors or warnings in this structure. </dd> 337 338 <dd> </dd> 339 </dl> 340 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/module_8c.html" id="RegisterModule">RegisterModule</a></h2> 341 342 <p>RegisterModule() adds an entry to the module list. It returns a pointer to the registered entry on success.</p> 343 344 <p>The format of the RegisterModule module is:</p> 345 346 <pre class="text"> 347 ModuleInfo *RegisterModule(const ModuleInfo *module_info, 348 ExceptionInfo *exception) 349 </pre> 350 351 <p>A description of each parameter follows:</p> 352 353 <dd> 354 </dd> 355 356 <dd> </dd> 357 <dl class="dl-horizontal"> 358 <dt>info</dt> 359 <dd>a pointer to the registered entry is returned. </dd> 360 361 <dd> </dd> 362 <dt>module_info</dt> 363 <dd>a pointer to the ModuleInfo structure to register. </dd> 364 365 <dd> </dd> 366 <dt>exception</dt> 367 <dd>return any errors or warnings in this structure. </dd> 368 369 <dd> </dd> 370 </dl> 371 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/module_8c.html" id="TagToCoderModuleName">TagToCoderModuleName</a></h2> 372 373 <p>TagToCoderModuleName() munges a module tag and obtains the filename of the corresponding module.</p> 374 375 <p>The format of the TagToCoderModuleName module is:</p> 376 377 <pre class="text"> 378 char *TagToCoderModuleName(const char *tag,char *name) 379 </pre> 380 381 <p>A description of each parameter follows:</p> 382 383 <dd> 384 </dd> 385 386 <dd> </dd> 387 <dl class="dl-horizontal"> 388 <dt>tag</dt> 389 <dd>a character string representing the module tag. </dd> 390 391 <dd> </dd> 392 <dt>name</dt> 393 <dd>return the module name here. </dd> 394 395 <dd> </dd> 396 </dl> 397 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/module_8c.html" id="TagToFilterModuleName">TagToFilterModuleName</a></h2> 398 399 <p>TagToFilterModuleName() munges a module tag and returns the filename of the corresponding filter module.</p> 400 401 <p>The format of the TagToFilterModuleName module is:</p> 402 403 <pre class="text"> 404 void TagToFilterModuleName(const char *tag,char name) 405 </pre> 406 407 <p>A description of each parameter follows:</p> 408 409 <dd> 410 </dd> 411 412 <dd> </dd> 413 <dl class="dl-horizontal"> 414 <dt>tag</dt> 415 <dd>a character string representing the module tag. </dd> 416 417 <dd> </dd> 418 <dt>name</dt> 419 <dd>return the filter name here. </dd> 420 421 <dd> </dd> 422 </dl> 423 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/module_8c.html" id="TagToModuleName">TagToModuleName</a></h2> 424 425 <p>TagToModuleName() munges the module tag name and returns an upper-case tag name as the input string, and a user-provided format.</p> 426 427 <p>The format of the TagToModuleName module is:</p> 428 429 <pre class="text"> 430 TagToModuleName(const char *tag,const char *format,char *module) 431 </pre> 432 433 <p>A description of each parameter follows:</p> 434 435 <dd> 436 </dd> 437 438 <dd> </dd> 439 <dl class="dl-horizontal"> 440 <dt>tag</dt> 441 <dd>the module tag. </dd> 442 443 <dd> </dd> 444 <dt>format</dt> 445 <dd>a sprintf-compatible format string containing s where the upper-case tag name is to be inserted. </dd> 446 447 <dd> </dd> 448 <dt>module</dt> 449 <dd>pointer to a destination buffer for the formatted result. </dd> 450 451 <dd> </dd> 452 </dl> 453 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/module_8c.html" id="UnregisterModule">UnregisterModule</a></h2> 454 455 <p>UnregisterModule() unloads a module, and invokes its de-registration module. Returns MagickTrue on success, and MagickFalse if there is an error.</p> 456 457 <p>The format of the UnregisterModule module is:</p> 458 459 <pre class="text"> 460 MagickBooleanType UnregisterModule(const ModuleInfo *module_info, 461 ExceptionInfo *exception) 462 </pre> 463 464 <p>A description of each parameter follows:</p> 465 466 <dd> 467 </dd> 468 469 <dd> </dd> 470 <dl class="dl-horizontal"> 471 <dt>module_info</dt> 472 <dd>the module info. </dd> 473 474 <dd> </dd> 475 <dt>exception</dt> 476 <dd>return any errors or warnings in this structure. </dd> 477 478 <dd> </dd> 479 </dl> 480 </div> 481 <footer class="magick-footer"> 482 <p><a href="../script/support.php">Donate</a> 483 <a href="../script/sitemap.php">Sitemap</a> 484 <a href="../script/links.php">Related</a> 485 <a href="../script/architecture.php">Architecture</a> 486 </p> 487 <p><a href="module.php#">Back to top</a> 488 <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> 489 <a href="../script/contact.php">Contact Us</a></p> 490 <p><small> 1999-2016 ImageMagick Studio LLC</small></p> 491 </footer> 492 </div><!-- /.container --> 493 494 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> 495 <script src="http://nextgen.imagemagick.org/js/magick.php"></script> 496 </div> 497 </body> 498 </html> 499