blob: 4f7e10f31ac18ae024bf4d8139f7b9b1b1185c47 [file] [log] [blame]
Cristy594d2772015-11-15 10:47:42 -05001
2
3
4
cristy29dc8652015-05-12 16:26:21 +00005<!DOCTYPE html>
cristy44443b92015-05-05 00:06:07 +00006<html lang="en">
cristy06f63f22012-10-31 00:50:07 +00007<head>
Cristy594d2772015-11-15 10:47:42 -05008 <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
cristy29f2c972015-07-28 13:37:46 +00009 <title>ImageMagick: MagickCore, C API for ImageMagick: Loadable Modules</title>
Cristy594d2772015-11-15 10:47:42 -050010 <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 Bézier 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"/>
Cristyce4a3552015-12-14 13:53:35 -050022 <meta name="copyright" content="Copyright (c) 1999-2015 ImageMagick Studio LLC"/>
Cristy594d2772015-11-15 10:47:42 -050023 <meta name="distribution" content="Global"/>
24 <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1"/>
25 <link rel="icon" href="../images/wand.png"/>
26 <link rel="shortcut icon" href="../images/wand.ico"/>
27 <link rel="stylesheet" href="../css/magick.html"/>
cristy06f63f22012-10-31 00:50:07 +000028</head>
cristy44443b92015-05-05 00:06:07 +000029<body>
cristy06f63f22012-10-31 00:50:07 +000030<div class="main">
cristy44443b92015-05-05 00:06:07 +000031<div class="magick-masthead">
32 <div class="container">
Cristye93be682015-11-26 09:07:51 -050033 <script async="async" src="http://localhost/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle"
Cristy594d2772015-11-15 10:47:42 -050034 style="display:block"
35 data-ad-client="ca-pub-3129977114552745"
36 data-ad-slot="6345125851"
37 data-ad-format="auto"></ins>
cristy29f2c972015-07-28 13:37:46 +000038 <script>
Cristy542697a2015-10-12 20:10:32 -040039 (adsbygoogle = window.adsbygoogle || []).push({});
cristy44443b92015-05-05 00:06:07 +000040 </script>
cristy44443b92015-05-05 00:06:07 +000041 <nav class="magick-nav">
cristy2f563d42015-05-06 23:36:51 +000042 <a class="magick-nav-item " href="../index.html">Home</a>
cristyea2793e2015-05-31 16:52:26 +000043 <a class="magick-nav-item " href="../binary-releases.html">Download</a>
cristy38185362015-05-07 20:09:56 +000044 <a class="magick-nav-item " href="../command-line-tools.html">Tools</a>
Cristye93be682015-11-26 09:07:51 -050045 <a class="magick-nav-item " href="../command-line-processing.html">Command-line</a>
cristyea2793e2015-05-31 16:52:26 +000046 <a class="magick-nav-item " href="../resources.html">Resources</a>
47 <a class="magick-nav-item " href="api.html">Develop</a>
cristy5b8fe762015-06-09 16:24:03 +000048 <a class="magick-nav-item " href="http://nextgen.imagemagick.org/script/search.php">Search</a>
cristya1890f02015-05-15 23:32:44 +000049 <a class="magick-nav-item pull-right" href="http://www.imagemagick.org/discourse-server/">Community</a>
cristy44443b92015-05-05 00:06:07 +000050 </nav>
51 </div>
52</div>
53<div class="container">
cristy4e638cd2015-05-07 16:47:40 +000054<div class="magick-header">
Cristy594d2772015-11-15 10:47:42 -050055<p class="text-center"><a href="module.html#AcquireModuleInfo">AcquireModuleInfo</a> &#8226; <a href="module.html#DestroyModuleList">DestroyModuleList</a> &#8226; <a href="module.html#GetModuleInfo">GetModuleInfo</a> &#8226; <a href="module.html#GetModuleInfoList">GetModuleInfoList</a> &#8226; <a href="module.html#GetModuleList">GetModuleList</a> &#8226; <a href="module.html#GetMagickModulePath">GetMagickModulePath</a> &#8226; <a href="module.html#IsModuleTreeInstantiated">IsModuleTreeInstantiated</a> &#8226; <a href="module.html#InvokeDynamicImageFilter">InvokeDynamicImageFilter</a> &#8226; <a href="module.html#ListModuleInfo">ListModuleInfo</a> &#8226; <a href="module.html#OpenModule">OpenModule</a> &#8226; <a href="module.html#OpenModules">OpenModules</a> &#8226; <a href="module.html#RegisterModule">RegisterModule</a> &#8226; <a href="module.html#TagToCoderModuleName">TagToCoderModuleName</a> &#8226; <a href="module.html#TagToFilterModuleName">TagToFilterModuleName</a> &#8226; <a href="module.html#TagToModuleName">TagToModuleName</a> &#8226; <a href="module.html#UnregisterModule">UnregisterModule</a></p>
cristy06f63f22012-10-31 00:50:07 +000056
Cristye93be682015-11-26 09:07:51 -050057<h2><a href="http://www.imagemagick.org/api/MagickCore/module_8c.html" id="AcquireModuleInfo">AcquireModuleInfo</a></h2>
cristycecc9492015-06-09 16:53:50 +000058
59<p>AcquireModuleInfo() allocates the ModuleInfo structure.</p>
60
61<p>The format of the AcquireModuleInfo method is:</p>
62
63<pre class="text">
64ModuleInfo *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>
Cristye93be682015-11-26 09:07:51 -050083<h2><a href="http://www.imagemagick.org/api/MagickCore/module_8c.html" id="DestroyModuleList">DestroyModuleList</a></h2>
cristycecc9492015-06-09 16:53:50 +000084
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">
90void DestroyModuleList(void)
91</pre>
92
Cristye93be682015-11-26 09:07:51 -050093<h2><a href="http://www.imagemagick.org/api/MagickCore/module_8c.html" id="GetModuleInfo">GetModuleInfo</a></h2>
cristycecc9492015-06-09 16:53:50 +000094
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">
100ModuleInfo *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>
Cristye93be682015-11-26 09:07:51 -0500119<h2><a href="http://www.imagemagick.org/api/MagickCore/module_8c.html" id="GetModuleInfoList">GetModuleInfoList</a></h2>
cristycecc9492015-06-09 16:53:50 +0000120
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">
126const 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>
Cristye93be682015-11-26 09:07:51 -0500150<h2><a href="http://www.imagemagick.org/api/MagickCore/module_8c.html" id="GetModuleList">GetModuleList</a></h2>
cristycecc9492015-06-09 16:53:50 +0000151
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">
157char **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>
Cristye93be682015-11-26 09:07:51 -0500185<h2><a href="http://www.imagemagick.org/api/MagickCore/module_8c.html" id="GetMagickModulePath">GetMagickModulePath</a></h2>
cristycecc9492015-06-09 16:53:50 +0000186
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">
192MagickBooleanType 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>
Cristye93be682015-11-26 09:07:51 -0500220<h2><a href="http://www.imagemagick.org/api/MagickCore/module_8c.html" id="IsModuleTreeInstantiated">IsModuleTreeInstantiated</a></h2>
cristycecc9492015-06-09 16:53:50 +0000221
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">
227IsModuleTreeInstantiated(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
Cristye93be682015-11-26 09:07:51 -0500235<h2><a href="http://www.imagemagick.org/api/MagickCore/module_8c.html" id="InvokeDynamicImageFilter">InvokeDynamicImageFilter</a></h2>
cristycecc9492015-06-09 16:53:50 +0000236
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">
242MagickBooleanType 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>
Cristye93be682015-11-26 09:07:51 -0500274<h2><a href="http://www.imagemagick.org/api/MagickCore/module_8c.html" id="ListModuleInfo">ListModuleInfo</a></h2>
cristycecc9492015-06-09 16:53:50 +0000275
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">
281MagickBooleanType 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
Cristye93be682015-11-26 09:07:51 -0500292<h2><a href="http://www.imagemagick.org/api/MagickCore/module_8c.html" id="OpenModule">OpenModule</a></h2>
cristycecc9492015-06-09 16:53:50 +0000293
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">
299MagickBooleanType 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>
Cristye93be682015-11-26 09:07:51 -0500318<h2><a href="http://www.imagemagick.org/api/MagickCore/module_8c.html" id="OpenModules">OpenModules</a></h2>
cristycecc9492015-06-09 16:53:50 +0000319
320<p>OpenModules() loads all available modules.</p>
321
322<p>The format of the OpenModules module is:</p>
323
324<pre class="text">
325MagickBooleanType 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>
Cristye93be682015-11-26 09:07:51 -0500340<h2><a href="http://www.imagemagick.org/api/MagickCore/module_8c.html" id="RegisterModule">RegisterModule</a></h2>
cristycecc9492015-06-09 16:53:50 +0000341
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">
347ModuleInfo *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>
Cristye93be682015-11-26 09:07:51 -0500371<h2><a href="http://www.imagemagick.org/api/MagickCore/module_8c.html" id="TagToCoderModuleName">TagToCoderModuleName</a></h2>
cristycecc9492015-06-09 16:53:50 +0000372
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">
378char *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>
Cristye93be682015-11-26 09:07:51 -0500397<h2><a href="http://www.imagemagick.org/api/MagickCore/module_8c.html" id="TagToFilterModuleName">TagToFilterModuleName</a></h2>
cristycecc9492015-06-09 16:53:50 +0000398
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">
404void 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>
Cristye93be682015-11-26 09:07:51 -0500423<h2><a href="http://www.imagemagick.org/api/MagickCore/module_8c.html" id="TagToModuleName">TagToModuleName</a></h2>
cristycecc9492015-06-09 16:53:50 +0000424
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">
430TagToModuleName(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>
Cristye93be682015-11-26 09:07:51 -0500453<h2><a href="http://www.imagemagick.org/api/MagickCore/module_8c.html" id="UnregisterModule">UnregisterModule</a></h2>
cristycecc9492015-06-09 16:53:50 +0000454
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">
460MagickBooleanType 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>
cristy06f63f22012-10-31 00:50:07 +0000480</div>
cristy44443b92015-05-05 00:06:07 +0000481 <footer class="magick-footer">
cristy29f2c972015-07-28 13:37:46 +0000482 <p><a href="../support.html">Donate</a>
483 <a href="../sitemap.html">Sitemap</a>
cristy38185362015-05-07 20:09:56 +0000484 <a href="../links.html">Related</a>
cristy29f2c972015-07-28 13:37:46 +0000485 <a href="../architecture.html">Architecture</a>
cristy44443b92015-05-05 00:06:07 +0000486</p>
487 <p><a href="module.html#">Back to top</a>
cristyea2793e2015-05-31 16:52:26 +0000488 <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a>
cristy5b8fe762015-06-09 16:24:03 +0000489 <a href="http://nextgen.imagemagick.org/script/contact.php">Contact Us</a></p>
Cristyce4a3552015-12-14 13:53:35 -0500490 <p><small>© 1999-2015 ImageMagick Studio LLC</small></p>
cristy44443b92015-05-05 00:06:07 +0000491 </footer>
492</div><!-- /.container -->
cristy06f63f22012-10-31 00:50:07 +0000493
Cristye93be682015-11-26 09:07:51 -0500494 <script src="https://localhost/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
cristy29f2c972015-07-28 13:37:46 +0000495 <script src="http://nextgen.imagemagick.org/js/magick.html"></script>
cristy44cbd482013-08-04 20:53:36 +0000496</div>
cristy06f63f22012-10-31 00:50:07 +0000497</body>
cristy5a367e42015-05-05 12:39:18 +0000498</html>