• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2
3
4
5<!DOCTYPE html>
6<html lang="en">
7<head>
8  <meta charset="utf-8"  />
9  <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1,shrink-to-fit=no"  />
10  <title>MagickCore, C API: Monitor or Limit Resource Consumption @ ImageMagick</title>
11  <meta name="application-name" content="ImageMagick" />
12  <meta name="description" content="Use ImageMagick® to create, edit, compose, or convert bitmap images. You can resize your image, crop it, change its shades and colors, add captions, among other operations." />
13  <meta name="application-url" content="https://imagemagick.org" />
14  <meta name="generator" content="PHP" />
15  <meta name="keywords" content="magickcore, c, api:, monitor, or, limit, resource, consumption, 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-2017 ImageMagick Studio LLC" />
23  <meta name="distribution" content="Global" />
24  <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1" />
25  <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
26  <link href="resource.html" rel="canonical" />
27  <link href="../../images/wand.png" rel="icon" />
28  <link href="../../images/wand.ico" rel="shortcut icon" />
29  <link href="../assets/magick.css" rel="stylesheet" />
30</head>
31<body>
32  <header>
33  <nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
34    <a class="navbar-brand" href="../../"><img class="d-block" id="icon" alt="ImageMagick" width="32" height="32" src="../../images/wand.ico"/></a>
35    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsMagick" aria-controls="navbarsMagick" aria-expanded="false" aria-label="Toggle navigation">
36      <span class="navbar-toggler-icon"></span>
37    </button>
38
39    <div class="navbar-collapse collapse" id="navbarsMagick" style="">
40    <ul class="navbar-nav mr-auto">
41      <li class="nav-item ">
42        <a class="nav-link" href="quantize.html">Home <span class="sr-only">(current)</span></a>
43      </li>
44      <li class="nav-item ">
45        <a class="nav-link" href="../../www/download.html">Download</a>
46      </li>
47      <li class="nav-item ">
48        <a class="nav-link" href="../../www/command-line-tools.html">Tools</a>
49      </li>
50      <li class="nav-item ">
51        <a class="nav-link" href="../../www/command-line-processing.html">Command-line</a>
52      </li>
53      <li class="nav-item ">
54        <a class="nav-link" href="../../www/resources.html">Resources</a>
55      </li>
56      <li class="nav-item ">
57        <a class="nav-link" href="../../www/develop.html">Develop</a>
58      </li>
59      <li class="nav-item">
60        <a class="nav-link" target="_blank" href="https://imagemagick.org/discourse-server/">Community</a>
61      </li>
62    </ul>
63    <form class="form-inline my-2 my-lg-0" action="https://imagemagick.org/script/search.php">
64      <input class="form-control mr-sm-2" type="text" name="q" placeholder="Search" aria-label="Search">
65      <button class="btn btn-outline-success my-2 my-sm-0" type="submit" name="sa">Search</button>
66    </form>
67    </div>
68  </nav>
69  <div class="container">
70   <script async="async" src="https://localhost/pagead/js/adsbygoogle.js"></script>    <ins class="adsbygoogle"
71         style="display:block"
72         data-ad-client="ca-pub-3129977114552745"
73         data-ad-slot="6345125851"
74         data-ad-format="auto"></ins>
75    <script>
76      (adsbygoogle = window.adsbygoogle || []).push({});
77    </script>
78
79  </div>
80  </header>
81  <main class="container">
82    <div class="magick-template">
83<div class="magick-header">
84<p class="text-center"><a href="resource.html#AcquireMagickResource">AcquireMagickResource</a> &#8226; <a href="resource.html#AcquireUniqueFileResource">AcquireUniqueFileResource</a> &#8226; <a href="resource.html#GetMagickResource">GetMagickResource</a> &#8226; <a href="resource.html#GetMagickResourceLimit">GetMagickResourceLimit</a> &#8226; <a href="resource.html#ListMagickResourceInfo">ListMagickResourceInfo</a> &#8226; <a href="resource.html#RelinquishMagickResource">RelinquishMagickResource</a> &#8226; <a href="resource.html#RelinquishUniqueFileResource">RelinquishUniqueFileResource</a> &#8226; <a href="resource.html#SetMagickResourceLimit">SetMagickResourceLimit</a></p>
85
86<h2><a href="../../api/MagickCore/resource_8c.html" id="AcquireMagickResource">AcquireMagickResource</a></h2>
87
88<p>AcquireMagickResource() acquires resources of the specified type. MagickFalse is returned if the specified resource is exhausted otherwise MagickTrue.</p>
89
90<p>The format of the AcquireMagickResource() method is:</p>
91
92<pre class="text">
93MagickBooleanType AcquireMagickResource(const ResourceType type,
94  const MagickSizeType size)
95</pre>
96
97<p>A description of each parameter follows:</p>
98
99<dd>
100</dd>
101
102<dd> </dd>
103<dl class="dl-horizontal">
104<dt>type</dt>
105<dd>the type of resource. </dd>
106
107<dd> </dd>
108<dt>size</dt>
109<dd>the number of bytes needed from for this resource. </dd>
110
111<dd>  </dd>
112</dl>
113<h2><a href="../../api/MagickCore/resource_8c.html" id="AcquireUniqueFileResource">AcquireUniqueFileResource</a></h2>
114
115<p>AcquireUniqueFileResource() returns a unique file name, and returns a file descriptor for the file open for reading and writing.</p>
116
117<p>The format of the AcquireUniqueFileResource() method is:</p>
118
119<pre class="text">
120int AcquireUniqueFileResource(char *path)
121</pre>
122
123<p>A description of each parameter follows:</p>
124
125<dd>
126</dd>
127
128<dd> </dd>
129<dl class="dl-horizontal">
130<dt> path</dt>
131<dd> Specifies a pointer to an array of characters.  The unique path name is returned in this array. </dd>
132
133<dd>  </dd>
134</dl>
135<h2><a href="../../api/MagickCore/resource_8c.html" id="GetMagickResource">GetMagickResource</a></h2>
136
137<p>GetMagickResource() returns the specified resource.</p>
138
139<p>The format of the GetMagickResource() method is:</p>
140
141<pre class="text">
142MagickSizeType GetMagickResource(const ResourceType type)
143</pre>
144
145<p>A description of each parameter follows:</p>
146
147<dd>
148</dd>
149
150<dd> </dd>
151<dl class="dl-horizontal">
152<dt>type</dt>
153<dd>the type of resource. </dd>
154
155<dd>  </dd>
156</dl>
157<h2><a href="../../api/MagickCore/resource_8c.html" id="GetMagickResourceLimit">GetMagickResourceLimit</a></h2>
158
159<p>GetMagickResourceLimit() returns the specified resource limit.</p>
160
161<p>The format of the GetMagickResourceLimit() method is:</p>
162
163<pre class="text">
164MagickSizeType GetMagickResourceLimit(const ResourceType type)
165</pre>
166
167<p>A description of each parameter follows:</p>
168
169<dd>
170</dd>
171
172<dd> </dd>
173<dl class="dl-horizontal">
174<dt>type</dt>
175<dd>the type of resource. </dd>
176
177<dd>  </dd>
178</dl>
179<h2><a href="../../api/MagickCore/resource_8c.html" id="ListMagickResourceInfo">ListMagickResourceInfo</a></h2>
180
181<p>ListMagickResourceInfo() lists the resource info to a file.</p>
182
183<p>The format of the ListMagickResourceInfo method is:</p>
184
185<pre class="text">
186MagickBooleanType ListMagickResourceInfo(FILE *file,
187  ExceptionInfo *exception)
188</pre>
189
190<p>A description of each parameter follows.</p>
191
192<dt>file</dt>
193<p>An pointer to a FILE.</p>
194
195<dt>exception</dt>
196<p>return any errors or warnings in this structure.</p>
197
198<h2><a href="../../api/MagickCore/resource_8c.html" id="RelinquishMagickResource">RelinquishMagickResource</a></h2>
199
200<p>RelinquishMagickResource() relinquishes resources of the specified type.</p>
201
202<p>The format of the RelinquishMagickResource() method is:</p>
203
204<pre class="text">
205void RelinquishMagickResource(const ResourceType type,
206  const MagickSizeType size)
207</pre>
208
209<p>A description of each parameter follows:</p>
210
211<dd>
212</dd>
213
214<dd> </dd>
215<dl class="dl-horizontal">
216<dt>type</dt>
217<dd>the type of resource. </dd>
218
219<dd> </dd>
220<dt>size</dt>
221<dd>the size of the resource. </dd>
222
223<dd>  </dd>
224</dl>
225<h2><a href="../../api/MagickCore/resource_8c.html" id="RelinquishUniqueFileResource">RelinquishUniqueFileResource</a></h2>
226
227<p>RelinquishUniqueFileResource() relinquishes a unique file resource.</p>
228
229<p>The format of the RelinquishUniqueFileResource() method is:</p>
230
231<pre class="text">
232MagickBooleanType RelinquishUniqueFileResource(const char *path)
233</pre>
234
235<p>A description of each parameter follows:</p>
236
237<dd>
238</dd>
239
240<dd> </dd>
241<dl class="dl-horizontal">
242<dt>name</dt>
243<dd>the name of the temporary resource. </dd>
244
245<dd>  </dd>
246</dl>
247<h2><a href="../../api/MagickCore/resource_8c.html" id="SetMagickResourceLimit">SetMagickResourceLimit</a></h2>
248
249<p>SetMagickResourceLimit() sets the limit for a particular resource.</p>
250
251<p>The format of the SetMagickResourceLimit() method is:</p>
252
253<pre class="text">
254MagickBooleanType SetMagickResourceLimit(const ResourceType type,
255  const MagickSizeType limit)
256</pre>
257
258<p>A description of each parameter follows:</p>
259
260<dd>
261</dd>
262
263<dd> </dd>
264<dl class="dl-horizontal">
265<dt>type</dt>
266<dd>the type of resource. </dd>
267
268<dd> </dd>
269<dt>limit</dt>
270<dd>the maximum limit for the resource. </dd>
271
272<dd>  </dd>
273</dl>
274</div>
275    </div>
276  </main><!-- /.container -->
277  <footer class="magick-footer">
278    <p><a href="../../www/security-policy.html">Security</a> •
279    <a href="../../www/architecture.html">Architecture</a> •
280    <a href="../../www/links.html">Related</a> •
281     <a href="../../www/sitemap.html">Sitemap</a>
282
283    <a href="resource.html#"><img class="d-inline" id="wand" alt="And Now a Touch of Magick" width="16" height="16" src="../../images/wand.ico"/></a>
284
285    <a href="http://pgp.mit.edu/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a> •
286    <a href="../../www/support.html">Donate</a> •
287    <a href="../../www/contact.html">Contact Us</a>
288    <br/>
289    <small>© 1999-2019 ImageMagick Studio LLC</small></p>
290  </footer>
291
292  <!-- Javascript assets -->
293  <script src="../assets/magick.js" crossorigin="anonymous"></script>
294  <script>window.jQuery || document.write('<script src="https://localhost/ajax/libs/jquery/3.3.1/jquery.min.js"><\/script>')</script>
295</body>
296</html>
297<!-- Magick Cache 1st January 2019 21:08 -->