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