1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
\r
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
\r
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
\r
5 <meta http-equiv="Content-Type" value="application/xhtml+xml" />
\r
6 <meta name="verify-v1" content="g222frIIxcQTrvDR3NBRUSKP3AnMNoqxOkIniCEkV7U=" />
\r
7 <link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf" />
\r
8 <style type="text/css" media="screen,projection"><!--
\r
9 @import url("../../www/magick.css");
\r
11 <link rel="shortcut icon" href="../../images/wand.ico" type="images/vnd.microsoft.icon"/>
12 <title>ImageMagick: MagickCore, C API for ImageMagick: Working with Image Lists</title>
13 <meta http-equiv="Content-Language" content="en-US"/>
14 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
15 <meta http-equiv="Reply-to" content="magick-users@imagemagick.org"/>
16 <meta name="Generator" content="PHP"/>
17 <meta name="Keywords" content="magickcore, c, api, for, imagemagick:, working, with, image, lists, ImageMagick, ImageMagic, MagickCore, MagickWand, PerlMagick, Magick++, RMagick, PythonMagick, JMagick, TclMagick, Image, Magick, Magic, Wand, ImageMagickObject, Swiss, Army, Knife, Image, Processing"/>
18 <meta name="Description" content="ImageMagick® is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (about 100) including GIF, JPEG, JPEG-2000, PNG, PDF, PhotoCD, TIFF, and DPX. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves. ImageMagick is free software delivered as a ready-to-run binary distribution or as source code that you can freely use, copy, modify, and distribute. Its license is compatible with the GPL. It runs on all major operating systems. The functionality of ImageMagick is typically utilized from the command line or you can use the features from programs written in your favorite programming language. Choose from these interfaces: MagickCore (C), MagickWand (C), ChMagick (Ch), Magick++ (C++), JMagick (Java), L-Magick (Lisp), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP (PHP), PythonMagick (Python), RMagick (Ruby), or TclMagick (Tcl/TK). With a language interface, use ImageMagick to modify or create images automagically and dynamically."/>
19 <meta name="Rating" content="GENERAL"/>
20 <meta name="Robots" content="INDEX, FOLLOW"/>
21 <meta name="Generator" content="ImageMagick Studio LLC"/>
22 <meta name="Author" content="ImageMagick Studio LLC"/>
23 <meta name="Revisit-after" content="2 DAYS"/>
24 <meta name="Resource-type" content="document"/>
25 <meta name="Copyright" content="Copyright (c) 1999-2010 ImageMagick Studio LLC"/>
26 <meta name="Distribution" content="Global"/>
29 <body id="www-imagemagick-org">
\r
30 <div class="titlebar">
\r
31 <a href="../../index.html">
\r
32 <img src="../../images/script.png" alt="[ImageMagick]"
\r
33 style="width: 350px; height: 60px; margin: 28px auto; float: left;" /></a>
\r
34 <a href="http://www.networkredux.com">
\r
35 <img src="../../images/networkredux.png" alt="[sponsor]"
\r
36 style="margin: 45px auto; border: 0px; float: left;" /></a>
\r
37 <a href="http://www.imagemagick.org/discourse-server/">
\r
38 <img src="../../images/logo.jpg" alt=""
\r
39 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
\r
40 <a href="../../index.html">
\r
41 <img src="../../images/sprite.jpg" alt=""
\r
42 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
\r
45 <div class="eastbar">
\r
48 <a href="../../index.html">About ImageMagick</a>
50 <div class="sep"></div>
\r
52 <a href="../../www/command-line-tools.html">Command-line Tools</a>
55 <a href="../../www/command-line-processing.html">Processing</a>
58 <a href="../../www/command-line-options.html">Options</a>
61 <a href="http://www.imagemagick.org/Usage/">Usage</a>
64 <a href="../../www/api.html">Program Interfaces</a>
67 <a href="../../www/magick-wand.html">MagickWand</a>
70 <a href="../../www/magick-core.html">MagickCore</a>
73 <a href="../../www/perl-magick.html">PerlMagick</a>
76 <a href="../../Magick++/">Magick++</a>
79 <a href="../../www/architecture.html">Architecture</a>
81 <div class="sep"></div>
\r
83 <a href="../../www/install-source.html">Install from Source</a>
86 <a href="../../www/install-source.html#unix">Unix</a>
89 <a href="../../www/install-source.html#windows">Windows</a>
92 <a href="../../www/binary-releases.html">Binary Releases</a>
95 <a href="../../www/binary-releases.html#unix">Unix</a>
98 <a href="../../www/binary-releases.html#macosx">Mac OS X</a>
101 <a href="../../www/binary-releases.html#windows">Windows</a>
104 <a href="../../www/resources.html">Resources</a>
106 <div class="sep"></div>
\r
108 <a href="../../www/download.html">Download</a>
110 <div class="sep"></div>
\r
112 <a href="../http://www.imagemagick.org/script/search.php">Search</a>
114 <div class="sep"></div>
\r
116 <a href="../../www/sitemap.html">Site Map</a>
119 <a href="../../www/links.html">Links</a>
121 <div class="sep"></div>
\r
123 <a href="../../www/sponsors.html">Sponsors:</a>
125 <div class="sponsbox">
126 <div class="sponsor">
127 <a href="http://www.abi-stoff.de/abizeitung/" title="Abibuch">Abizeitung</a><!-- 20101101000200 -->
129 <div class="sponsor">
130 <a href="http://www.tomsgutscheine.de">Tom's Gutscheine</a><!-- 201005010360 invendio.de-->
132 <div class="sponsor">
133 <a href="http://www.online-kredit-index.de">Kredit</a><!-- 201004010120 Buchhorn -->
135 <div class="sponsor">
136 <a href="http://www.blumenversender.com">Blumenversand</a><!-- 201005010120 -->
138 <div class="sponsor">
139 <a href="http://www.print24.de/">Druckerei</a><!-- 201009010720 -->
141 <div class="sponsor">
142 <a href="http://www.goyax.de">Börse</a><!-- 201001000240 Gewiese digital-finance.de -->
144 <div class="sponsor">
145 <a href="http://www.allesdruck.de">Druckerei Online</a><!-- 201012001200 allesdruck.de-->
147 <div class="sponsor">
148 <a href="http://www.who-sells-it.com/">Free Catalogs</a><!-- 201002010000 -->
158 <p class="navigation-index">[<a href="#AppendImageToList">AppendImageToList</a> • <a href="#CloneImageList">CloneImageList</a> • <a href="#CloneImages">CloneImages</a> • <a href="#DeleteImageFromList">DeleteImageFromList</a> • <a href="#DeleteImages">DeleteImages</a> • <a href="#DestroyImageList">DestroyImageList</a> • <a href="#GetFirstImageInList">GetFirstImageInList</a> • <a href="#GetImageFromList">GetImageFromList</a> • <a href="#GetImageIndexInList">GetImageIndexInList</a> • <a href="#GetImageListLength">GetImageListLength</a> • <a href="#GetLastImageInList">GetLastImageInList</a> • <a href="#GetNextImageInList">GetNextImageInList</a> • <a href="#GetPreviousImageInList">GetPreviousImageInList</a> • <a href="#ImageListToArray">ImageListToArray</a> • <a href="#InsertImageInList">InsertImageInList</a> • <a href="#NewImageList">NewImageList</a> • <a href="#PrependImageToList">PrependImageToList</a> • <a href="#RemoveImageFromList">RemoveImageFromList</a> • <a href="#RemoveFirstImageFromList">RemoveFirstImageFromList</a> • <a href="#RemoveLastImageFromList">RemoveLastImageFromList</a> • <a href="#ReplaceImageInList">ReplaceImageInList</a> • <a href="#ReverseImageList">ReverseImageList</a> • <a href="#SpliceImageIntoList">SpliceImageIntoList</a> • <a href="#SplitImageList">SplitImageList</a>]</p>
160 <h2><a href="http://www.imagemagick.org/api/MagickCore/list
161 _8c.html" target="source" name="AppendImageToList">AppendImageToList</a></h2>
162 <div class="doc-section">
164 <p>AppendImageToList() appends the second image list to the end of the first list. The given image list pointer is left unchanged, unless it was empty.</p></ol>
166 <p>The format of the AppendImageToList method is:</p>
169 AppendImageToList(Image *images,const Image *image)
172 <p>A description of each parameter follows:</p></ol>
175 <ol><p>the image list to be appended to.</p></ol>
178 <ol><p>the appended image or image list.</p></ol>
181 <h2><a href="http://www.imagemagick.org/api/MagickCore/list
182 _8c.html" target="source" name="CloneImageList">CloneImageList</a></h2>
183 <div class="doc-section">
185 <p>CloneImageList() returns a duplicate of the image list.</p></ol>
187 <p>The format of the CloneImageList method is:</p>
190 Image *CloneImageList(const Image *images,ExceptionInfo *exception)
193 <p>A description of each parameter follows:</p></ol>
196 <ol><p>the image list.</p></ol>
199 <ol><p>return any errors or warnings in this structure.</p></ol>
202 <h2><a href="http://www.imagemagick.org/api/MagickCore/list
203 _8c.html" target="source" name="CloneImages">CloneImages</a></h2>
204 <div class="doc-section">
206 <p>CloneImages() clones one or more images from an image sequence, using a comma separated list of image numbers or ranges.</p></ol>
208 <p>The numbers start at 0 for the first image in the list, while negative numbers refer to images starting counting from the end of the range. Images may be refered to multiple times to clone them multiple times. Images refered beyond the available number of images in list are ignored.</p></ol>
210 <p>Images referenced may be reversed, and results in a clone of those images also being made with a reversed order.</p></ol>
212 <p>The format of the CloneImages method is:</p>
215 Image *CloneImages(const Image *images,const char *scenes,
216 ExceptionInfo *exception)
219 <p>A description of each parameter follows:</p></ol>
222 <ol><p>the image sequence.</p></ol>
225 <ol><p>This character string specifies which scenes to clone (e.g. 1,3-5,7-3,2).</p></ol>
228 <ol><p>return any errors or warnings in this structure.</p></ol>
231 <h2><a href="http://www.imagemagick.org/api/MagickCore/list
232 _8c.html" target="source" name="DeleteImageFromList">DeleteImageFromList</a></h2>
233 <div class="doc-section">
235 <p>DeleteImageFromList() deletes an image from the list. List pointer is moved to the next image, if one is present. See RemoveImageFromList().</p></ol>
237 <p>The format of the DeleteImageFromList method is:</p>
240 DeleteImageFromList(Image **images)
243 <p>A description of each parameter follows:</p></ol>
246 <ol><p>the image list.</p></ol>
249 <h2><a href="http://www.imagemagick.org/api/MagickCore/list
250 _8c.html" target="source" name="DeleteImages">DeleteImages</a></h2>
251 <div class="doc-section">
253 <p>DeleteImages() deletes one or more images from an image sequence, using a comma separated list of image numbers or ranges.</p></ol>
255 <p>The numbers start at 0 for the first image, while negative numbers refer to images starting counting from the end of the range. Images may be refered to multiple times without problems. Image refered beyond the available number of images in list are ignored.</p></ol>
257 <p>If the referenced images are in the reverse order, that range will be completely ignored. Unlike CloneImages().</p></ol>
259 <p>The format of the DeleteImages method is:</p>
262 DeleteImages(Image **images,const char *scenes,ExceptionInfo *exception)
265 <p>A description of each parameter follows:</p></ol>
268 <ol><p>the image sequence.</p></ol>
271 <ol><p>This character string specifies which scenes to delete (e.g. 1,3-5,-2-6,2).</p></ol>
274 <ol><p>return any errors or warnings in this structure.</p></ol>
277 <h2><a href="http://www.imagemagick.org/api/MagickCore/list
278 _8c.html" target="source" name="DestroyImageList">DestroyImageList</a></h2>
279 <div class="doc-section">
281 <p>DestroyImageList() destroys an image list.</p></ol>
283 <p>The format of the DestroyImageList method is:</p>
286 Image *DestroyImageList(Image *image)
289 <p>A description of each parameter follows:</p></ol>
292 <ol><p>the image sequence.</p></ol>
295 <h2><a href="http://www.imagemagick.org/api/MagickCore/list
296 _8c.html" target="source" name="GetFirstImageInList">GetFirstImageInList</a></h2>
297 <div class="doc-section">
299 <p>GetFirstImageInList() returns a pointer to the first image in the list.</p></ol>
301 <p>The format of the GetFirstImageInList method is:</p>
304 Image *GetFirstImageInList(const Image *images)
307 <p>A description of each parameter follows:</p></ol>
310 <ol><p>the image list.</p></ol>
313 <h2><a href="http://www.imagemagick.org/api/MagickCore/list
314 _8c.html" target="source" name="GetImageFromList">GetImageFromList</a></h2>
315 <div class="doc-section">
317 <p>GetImageFromList() returns an image at the specified offset from the list.</p></ol>
319 <p>The format of the GetImageFromList method is:</p>
322 Image *GetImageFromList(const Image *images,const long index)
325 <p>A description of each parameter follows:</p></ol>
328 <ol><p>the image list.</p></ol>
331 <ol><p>the position within the list.</p></ol>
334 <h2><a href="http://www.imagemagick.org/api/MagickCore/list
335 _8c.html" target="source" name="GetImageIndexInList">GetImageIndexInList</a></h2>
336 <div class="doc-section">
338 <p>GetImageIndexInList() returns the offset in the list of the specified image.</p></ol>
340 <p>The format of the GetImageIndexInList method is:</p>
343 long GetImageIndexInList(const Image *images)
346 <p>A description of each parameter follows:</p></ol>
349 <ol><p>the image list.</p></ol>
352 <h2><a href="http://www.imagemagick.org/api/MagickCore/list
353 _8c.html" target="source" name="GetImageListLength">GetImageListLength</a></h2>
354 <div class="doc-section">
356 <p>GetImageListLength() returns the length of the list (the number of images in the list).</p></ol>
358 <p>The format of the GetImageListLength method is:</p>
361 unsigned long GetImageListLength(const Image *images)
364 <p>A description of each parameter follows:</p></ol>
367 <ol><p>the image list.</p></ol>
370 <h2><a href="http://www.imagemagick.org/api/MagickCore/list
371 _8c.html" target="source" name="GetLastImageInList">GetLastImageInList</a></h2>
372 <div class="doc-section">
374 <p>GetLastImageInList() returns a pointer to the last image in the list.</p></ol>
376 <p>The format of the GetLastImageInList method is:</p>
379 Image *GetLastImageInList(const Image *images)
382 <p>A description of each parameter follows:</p></ol>
385 <ol><p>the image list.</p></ol>
388 <h2><a href="http://www.imagemagick.org/api/MagickCore/list
389 _8c.html" target="source" name="GetNextImageInList">GetNextImageInList</a></h2>
390 <div class="doc-section">
392 <p>GetNextImageInList() returns the next image in the list.</p></ol>
394 <p>The format of the GetNextImageInList method is:</p>
397 Image *GetNextImageInList(const Image *images)
400 <p>A description of each parameter follows:</p></ol>
403 <ol><p>the image list.</p></ol>
406 <h2><a href="http://www.imagemagick.org/api/MagickCore/list
407 _8c.html" target="source" name="GetPreviousImageInList">GetPreviousImageInList</a></h2>
408 <div class="doc-section">
410 <p>GetPreviousImageInList() returns the previous image in the list.</p></ol>
412 <p>The format of the GetPreviousImageInList method is:</p>
415 Image *GetPreviousImageInList(const Image *images)
418 <p>A description of each parameter follows:</p></ol>
421 <ol><p>the image list.</p></ol>
424 <h2><a href="http://www.imagemagick.org/api/MagickCore/list
425 _8c.html" target="source" name="ImageListToArray">ImageListToArray</a></h2>
426 <div class="doc-section">
428 <p>ImageListToArray() is a convenience method that converts an image list to a sequential array. For example,</p></ol>
430 <p>group = ImageListToArray(images, exception); while (i = 0; group[i] != (Image *) NULL; i++) printf("s\n", group[i]->filename); printf("d images\n", i); group = RelinquishMagickMemory(group);</p></ol>
432 <p>The format of the ImageListToArray method is:</p>
435 Image **ImageListToArray(const Image *images,ExceptionInfo *exception)
438 <p>A description of each parameter follows:</p></ol>
441 <ol><p>the image list.</p></ol>
444 <ol><p>return any errors or warnings in this structure.</p></ol>
447 <h2><a href="http://www.imagemagick.org/api/MagickCore/list
448 _8c.html" target="source" name="InsertImageInList">InsertImageInList</a></h2>
449 <div class="doc-section">
451 <p>InsertImageInList() inserts the second image or image list into the first image list immediatally after the image pointed to. The given image list pointer is unchanged unless previously empty.</p></ol>
453 <p>The format of the InsertImageInList method is:</p>
456 InsertImageInList(Image **images,Image *image)
459 <p>A description of each parameter follows:</p></ol>
462 <ol><p>the image list to insert into.</p></ol>
465 <ol><p>the image list to insert.</p></ol>
468 <h2><a href="http://www.imagemagick.org/api/MagickCore/list
469 _8c.html" target="source" name="NewImageList">NewImageList</a></h2>
470 <div class="doc-section">
472 <p>NewImageList() creates an empty image list.</p></ol>
474 <p>The format of the NewImageList method is:</p>
477 Image *NewImageList(void)
481 <h2><a href="http://www.imagemagick.org/api/MagickCore/list
482 _8c.html" target="source" name="PrependImageToList">PrependImageToList</a></h2>
483 <div class="doc-section">
485 <p>PrependImageToList() prepends the image to the beginning of the list.</p></ol>
487 <p>The format of the PrependImageToList method is:</p>
490 PrependImageToList(Image *images,Image *image)
493 <p>A description of each parameter follows:</p></ol>
496 <ol><p>the image list.</p></ol>
499 <ol><p>the image.</p></ol>
502 <h2><a href="http://www.imagemagick.org/api/MagickCore/list
503 _8c.html" target="source" name="RemoveImageFromList">RemoveImageFromList</a></h2>
504 <div class="doc-section">
506 <p>RemoveImageFromList() removes and returns the image pointed to.</p></ol>
508 <p>The given image list pointer is set to point to the next image in list if it exists, otherwise it is set to the previous image, or NULL if list was emptied.</p></ol>
510 <p>The format of the RemoveImageFromList method is:</p>
513 Image *RemoveImageFromList(Image **images)
516 <p>A description of each parameter follows:</p></ol>
519 <ol><p>the image list.</p></ol>
522 <h2><a href="http://www.imagemagick.org/api/MagickCore/list
523 _8c.html" target="source" name="RemoveFirstImageFromList">RemoveFirstImageFromList</a></h2>
524 <div class="doc-section">
526 <p>RemoveFirstImageFromList() removes and returns the first image in the list.</p></ol>
528 <p>If the given image list pointer pointed to the removed first image, it is set to the new first image of list, or NULL if list was emptied, otherwise it is left as is.</p></ol>
530 <p>The format of the RemoveFirstImageFromList method is:</p>
533 Image *RemoveFirstImageFromList(Image **images)
536 <p>A description of each parameter follows:</p></ol>
539 <ol><p>the image list.</p></ol>
542 <h2><a href="http://www.imagemagick.org/api/MagickCore/list
543 _8c.html" target="source" name="RemoveLastImageFromList">RemoveLastImageFromList</a></h2>
544 <div class="doc-section">
546 <p>RemoveLastImageFromList() removes and returns the last image from the list.</p></ol>
548 <p>If the given image list pointer pointed to the removed last image, it is set to the new last image of list, or NULL if list was emptied, otherwise it is left as is.</p></ol>
550 <p>The format of the RemoveLastImageFromList method is:</p>
553 Image *RemoveLastImageFromList(Image **images)
556 <p>A description of each parameter follows:</p></ol>
559 <ol><p>the image list.</p></ol>
562 <h2><a href="http://www.imagemagick.org/api/MagickCore/list
563 _8c.html" target="source" name="ReplaceImageInList">ReplaceImageInList</a></h2>
564 <div class="doc-section">
566 <p>ReplaceImageInList() replaces an image in the list. Old image is destroyed. The given image list pointer is set to point to the just inserted image.</p></ol>
568 <p>The format of the ReplaceImageInList method is:</p>
571 ReplaceImageInList(Image **images,Image *image)
574 <p>A description of each parameter follows:</p></ol>
577 <ol><p>the image list.</p></ol>
580 <ol><p>the image.</p></ol>
583 <h2><a href="http://www.imagemagick.org/api/MagickCore/list
584 _8c.html" target="source" name="ReverseImageList">ReverseImageList</a></h2>
585 <div class="doc-section">
587 <p>ReverseImageList() reverses the order of an image list. The list pointer is reset to that start of the re-ordered list.</p></ol>
589 <p>The format of the ReverseImageList method is:</p>
592 void ReverseImageList(Image **images)
595 <p>A description of each parameter follows:</p></ol>
598 <ol><p>the image list.</p></ol>
601 <h2><a href="http://www.imagemagick.org/api/MagickCore/list
602 _8c.html" target="source" name="SpliceImageIntoList">SpliceImageIntoList</a></h2>
603 <div class="doc-section">
605 <p>SpliceImageIntoList() removes 'length' images from the list and replaces them with the specified splice. Removed images are returned.</p></ol>
607 <p>The format of the SpliceImageIntoList method is:</p>
610 SpliceImageIntoList(Image **images,const unsigned long,
614 <p>A description of each parameter follows:</p></ol>
617 <ol><p>the image list.</p></ol>
620 <ol><p>the length of the image list to remove.</p></ol>
623 <ol><p>Replace the removed image list with this list.</p></ol>
626 <h2><a href="http://www.imagemagick.org/api/MagickCore/list
627 _8c.html" target="source" name="SplitImageList">SplitImageList</a></h2>
628 <div class="doc-section">
630 <p>SplitImageList() splits an image into two lists, after given image The list that was split off is returned, which may be empty.</p></ol>
632 <p>The format of the SplitImageList method is:</p>
635 Image *SplitImageList(Image *images)
638 <p>A description of each parameter follows:</p></ol>
641 <ol><p>the image list.</p></ol>
648 <!-- <span id="linkbar-west"> </span> -->
\r
649 <span id="linkbar-center">
\r
650 <a href="http://www.imagemagick.org/discourse-server/">Discourse Server</a> •
\r
651 <a href="../../www/mailing-list.html">Mailing Lists</a> •
\r
652 <a href="http://studio.webbyland.com/ImageMagick/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
\r
654 <span id="linkbar-east"> </span>
\r
656 <div class="footer">
\r
657 <span id="footer-west">© 1999-2010 ImageMagick Studio LLC</span>
\r
658 <span id="footer-east"> <a href="../http://www.imagemagick.org/script/contact.php">Contact the Wizards</a></span>
\r
660 <div style="clear: both; margin: 0; width: 100%; "></div>
\r