]> granicus.if.org Git - imagemagick/blob - www/api/resource.html
Clone the image->image_info structure to prevent a dangling pointer
[imagemagick] / www / api / resource.html
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4   
5     <title>ImageMagick: MagickCore, C API for ImageMagick: Monitor or Limit Resource Consumption</title>
6   <meta http-equiv="content-type" content="text/html; charset=utf-8">
7   <meta name="application-name" content="ImageMagick">
8   <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.">
9   <meta name="application-url" content="http://www.imagemagick.org">
10   <meta name="generator" content="PHP">
11   <meta name="keywords" content="magickcore, c, api, for, imagemagick:, monitor, or, limit, resource, consumption, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert">
12   <meta name="rating" content="GENERAL">
13   <meta name="robots" content="INDEX, FOLLOW">
14   <meta name="generator" content="ImageMagick Studio LLC">
15   <meta name="author" content="ImageMagick Studio LLC">
16   <meta name="revisit-after" content="2 DAYS">
17   <meta name="resource-type" content="document">
18   <meta name="copyright" content="Copyright (c) 1999-2015 ImageMagick Studio LLC">
19   <meta name="distribution" content="Global">
20   <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1">
21   <link rel="icon" href="../images/wand.png">
22   <link rel="shortcut icon" href="../images/wand.ico">
23   <link rel="stylesheet" href="../css/magick.html">
24 </head>
25 <body>
26 <div class="main">
27 <div class="magick-masthead">
28   <div class="container">
29     <script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>    <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3129977114552745" data-ad-slot="6345125851" data-ad-format="auto"></ins>
30     <script>
31     (adsbygoogle = window.adsbygoogle || []).push({});
32     </script>
33     <nav class="magick-nav">
34       <a class="magick-nav-item " href="../index.html">Home</a>
35       <a class="magick-nav-item " href="../binary-releases.html">Download</a>
36       <a class="magick-nav-item " href="../command-line-tools.html">Tools</a>
37       <a class="magick-nav-item " href="../command-line-options.html">Options</a>
38       <a class="magick-nav-item " href="../resources.html">Resources</a>
39       <a class="magick-nav-item " href="api.html">Develop</a>
40       <a class="magick-nav-item " href="http://nextgen.imagemagick.org/script/search.php">Search</a>
41       <a class="magick-nav-item pull-right" href="http://www.imagemagick.org/discourse-server/">Community</a>
42     </nav>
43   </div>
44 </div>
45 <div class="container">
46 <div class="magick-header">
47 <p class="text-center"><a href="resource.html#AcquireMagickResource">AcquireMagickResource</a> • <a href="resource.html#AcquireUniqueFileResource">AcquireUniqueFileResource</a> • <a href="resource.html#GetMagickResource">GetMagickResource</a> • <a href="resource.html#GetMagickResourceLimit">GetMagickResourceLimit</a> • <a href="resource.html#ListMagickResourceInfo">ListMagickResourceInfo</a> • <a href="resource.html#RelinquishMagickResource">RelinquishMagickResource</a> • <a href="resource.html#RelinquishUniqueFileResource">RelinquishUniqueFileResource</a> • <a href="resource.html#SetMagickResourceLimit">SetMagickResourceLimit</a></p>
48
49 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/resource_8c.html" id="AcquireMagickResource">AcquireMagickResource</a></h2>
50
51 <p>AcquireMagickResource() acquires resources of the specified type. MagickFalse is returned if the specified resource is exhausted otherwise MagickTrue.</p>
52
53 <p>The format of the AcquireMagickResource() method is:</p>
54
55 <pre class="text">
56 MagickBooleanType AcquireMagickResource(const ResourceType type,
57   const MagickSizeType size)
58 </pre>
59
60 <p>A description of each parameter follows:</p>
61
62 <dd>
63 </dd>
64
65 <dd> </dd>
66 <dl class="dl-horizontal">
67 <dt>type</dt>
68 <dd>the type of resource. </dd>
69
70 <dd> </dd>
71 <dt>size</dt>
72 <dd>the number of bytes needed from for this resource. </dd>
73
74 <dd>  </dd>
75 </dl>
76 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/resource_8c.html" id="AcquireUniqueFileResource">AcquireUniqueFileResource</a></h2>
77
78 <p>AcquireUniqueFileResource() returns a unique file name, and returns a file descriptor for the file open for reading and writing.</p>
79
80 <p>The format of the AcquireUniqueFileResource() method is:</p>
81
82 <pre class="text">
83 int AcquireUniqueFileResource(char *path)
84 </pre>
85
86 <p>A description of each parameter follows:</p>
87
88 <dd>
89 </dd>
90
91 <dd> </dd>
92 <dl class="dl-horizontal">
93 <dt> path</dt>
94 <dd> Specifies a pointer to an array of characters.  The unique path name is returned in this array. </dd>
95
96 <dd>  </dd>
97 </dl>
98 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/resource_8c.html" id="GetMagickResource">GetMagickResource</a></h2>
99
100 <p>GetMagickResource() returns the specified resource.</p>
101
102 <p>The format of the GetMagickResource() method is:</p>
103
104 <pre class="text">
105 MagickSizeType GetMagickResource(const ResourceType type)
106 </pre>
107
108 <p>A description of each parameter follows:</p>
109
110 <dd>
111 </dd>
112
113 <dd> </dd>
114 <dl class="dl-horizontal">
115 <dt>type</dt>
116 <dd>the type of resource. </dd>
117
118 <dd>  </dd>
119 </dl>
120 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/resource_8c.html" id="GetMagickResourceLimit">GetMagickResourceLimit</a></h2>
121
122 <p>GetMagickResourceLimit() returns the specified resource limit.</p>
123
124 <p>The format of the GetMagickResourceLimit() method is:</p>
125
126 <pre class="text">
127 MagickSizeType GetMagickResourceLimit(const ResourceType type)
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>type</dt>
138 <dd>the type of resource. </dd>
139
140 <dd>  </dd>
141 </dl>
142 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/resource_8c.html" id="ListMagickResourceInfo">ListMagickResourceInfo</a></h2>
143
144 <p>ListMagickResourceInfo() lists the resource info to a file.</p>
145
146 <p>The format of the ListMagickResourceInfo method is:</p>
147
148 <pre class="text">
149 MagickBooleanType ListMagickResourceInfo(FILE *file,
150   ExceptionInfo *exception)
151 </pre>
152
153 <p>A description of each parameter follows.</p>
154
155 <dt>file</dt>
156 <p>An pointer to a FILE.</p>
157
158 <dt>exception</dt>
159 <p>return any errors or warnings in this structure.</p>
160
161 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/resource_8c.html" id="RelinquishMagickResource">RelinquishMagickResource</a></h2>
162
163 <p>RelinquishMagickResource() relinquishes resources of the specified type.</p>
164
165 <p>The format of the RelinquishMagickResource() method is:</p>
166
167 <pre class="text">
168 void RelinquishMagickResource(const ResourceType type,
169   const MagickSizeType size)
170 </pre>
171
172 <p>A description of each parameter follows:</p>
173
174 <dd>
175 </dd>
176
177 <dd> </dd>
178 <dl class="dl-horizontal">
179 <dt>type</dt>
180 <dd>the type of resource. </dd>
181
182 <dd> </dd>
183 <dt>size</dt>
184 <dd>the size of the resource. </dd>
185
186 <dd>  </dd>
187 </dl>
188 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/resource_8c.html" id="RelinquishUniqueFileResource">RelinquishUniqueFileResource</a></h2>
189
190 <p>RelinquishUniqueFileResource() relinquishes a unique file resource.</p>
191
192 <p>The format of the RelinquishUniqueFileResource() method is:</p>
193
194 <pre class="text">
195 MagickBooleanType RelinquishUniqueFileResource(const char *path)
196 </pre>
197
198 <p>A description of each parameter follows:</p>
199
200 <dd>
201 </dd>
202
203 <dd> </dd>
204 <dl class="dl-horizontal">
205 <dt>name</dt>
206 <dd>the name of the temporary resource. </dd>
207
208 <dd>  </dd>
209 </dl>
210 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/resource_8c.html" id="SetMagickResourceLimit">SetMagickResourceLimit</a></h2>
211
212 <p>SetMagickResourceLimit() sets the limit for a particular resource.</p>
213
214 <p>The format of the SetMagickResourceLimit() method is:</p>
215
216 <pre class="text">
217 MagickBooleanType SetMagickResourceLimit(const ResourceType type,
218   const MagickSizeType limit)
219 </pre>
220
221 <p>A description of each parameter follows:</p>
222
223 <dd>
224 </dd>
225
226 <dd> </dd>
227 <dl class="dl-horizontal">
228 <dt>type</dt>
229 <dd>the type of resource. </dd>
230
231 <dd> </dd>
232 <dt>limit</dt>
233 <dd>the maximum limit for the resource. </dd>
234
235 <dd>  </dd>
236 </dl>
237 </div>
238   <footer class="magick-footer">
239     <p><a href="../support.html">Donate</a> •
240      <a href="../sitemap.html">Sitemap</a> •
241     <a href="../links.html">Related</a> •
242     <a href="../architecture.html">Architecture</a>
243 </p>
244     <p><a href="resource.html#">Back to top</a> •
245     <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a> •
246     <a href="http://nextgen.imagemagick.org/script/contact.php">Contact Us</a></p>
247         <p><small>©  1999-2015 ImageMagick Studio LLC</small></p>
248   </footer>
249 </div><!-- /.container -->
250
251   <script src="http://nextgen.imagemagick.org/js/magick.html"></script>
252 </div>
253 </body>
254 </html>