X-Git-Url: https://granicus.if.org/sourcecode?a=blobdiff_plain;f=www%2Fapi%2Flist.html;h=3b985c2465b44648bbdc69f275322222edc006c5;hb=36421ee45722da418b8ab99d7e6358e4f86b9f1e;hp=5f746eae4c6abda42102381c294dcf8692d36f31;hpb=45dbd32b989cbbb4bf50a001f8e32c43a2240985;p=imagemagick diff --git a/www/api/list.html b/www/api/list.html index 5f746eae4..3b985c246 100644 --- a/www/api/list.html +++ b/www/api/list.html @@ -1,246 +1,104 @@ - - - - - - ImageMagick: MagickCore, C API for ImageMagick: Working with Image Lists - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - -
- - ImageMagick Logo - - ImageMagick Sprite -
- -
- - -
- -
- Unix -
-
- Mac OS X -
-
- iPhone -
-
- Windows -
-
- -
- Processing -
-
- Options -
-
- Usage -
- -
- MagickWand -
-
- MagickCore -
-
- PerlMagick -
-
- Magick++ -
-
- -
- Unix -
-
- Windows -
- - - -
- -
- -
- Links -
-
- -
- -
- -
- -
- -

Module list Methods

- - -

AppendImageToList

-
+ + + + + ImageMagick: MagickCore, C API for ImageMagick: Working with Image Lists + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + +
+
+
+
+

AppendImageToList • CloneImageList • CloneImages • DeleteImageFromList • DeleteImages • DestroyImageList • DuplicateImages • GetFirstImageInList • GetImageFromList • GetImageIndexInList • GetImageListLength • GetLastImageInList • GetNextImageInList • GetPreviousImageInList • ImageListToArray • InsertImageInList • NewImageList • PrependImageToList • RemoveImageFromList • RemoveFirstImageFromList • RemoveLastImageFromList • ReplaceImageInList • ReplaceImageInListReturnLast • ReverseImageList • SpliceImageIntoList • SplitImageList

+ +

AppendImageToList

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.

The format of the AppendImageToList method is:

-
-  AppendImageToList(Image *images,const Image *image)
+
+AppendImageToList(Image *images,const Image *image)
 

A description of each parameter follows:

-
images
-

the image list to be appended to.

+
+
+ +
+
+
images
+
the image list to be appended to.
-
image
-

the appended image or image list.

+
+
image
+
the appended image or image list.
-
-

CloneImageList

-
+
+ +

CloneImageList

CloneImageList() returns a duplicate of the image list.

The format of the CloneImageList method is:

-
-  Image *CloneImageList(const Image *images,ExceptionInfo *exception)
+
+Image *CloneImageList(const Image *images,ExceptionInfo *exception)
 

A description of each parameter follows:

-
images
-

the image list.

+
+
-
exception
-

return any errors or warnings in this structure.

+
+
+
images
+
the image list.
-
-

CloneImages

-
+
+
exception
+
return any errors or warnings in this structure.
+ +
+ +

CloneImages

CloneImages() clones one or more images from an image sequence, using a comma separated list of image numbers or ranges.

@@ -250,42 +108,54 @@

The format of the CloneImages method is:

-
-  Image *CloneImages(const Image *images,const char *scenes,
-    ExceptionInfo *exception)
+
+Image *CloneImages(const Image *images,const char *scenes,
+  ExceptionInfo *exception)
 

A description of each parameter follows:

-
images
-

the image sequence.

+
+
+ +
+
+
images
+
the image sequence.
-
scenes
-

This character string specifies which scenes to clone (e.g. 1,3-5,7-3,2).

+
+
scenes
+
This character string specifies which scenes to clone (e.g. 1,3-5,7-3,2).
-
exception
-

return any errors or warnings in this structure.

+
+
exception
+
return any errors or warnings in this structure.
-
-

DeleteImageFromList

-
+
+ +

DeleteImageFromList

DeleteImageFromList() deletes an image from the list. List pointer is moved to the next image, if one is present. See RemoveImageFromList().

The format of the DeleteImageFromList method is:

-
-  DeleteImageFromList(Image **images)
+
+DeleteImageFromList(Image **images)
 

A description of each parameter follows:

-
images
-

the image list.

+
+
-
-

DeleteImages

-
+
+
+
images
+
the image list.
+ +
+
+

DeleteImages

DeleteImages() deletes one or more images from an image sequence, using a comma separated list of image numbers or ranges.

@@ -295,41 +165,53 @@

The format of the DeleteImages method is:

-
-  DeleteImages(Image **images,const char *scenes,ExceptionInfo *exception)
+
+DeleteImages(Image **images,const char *scenes,ExceptionInfo *exception)
 

A description of each parameter follows:

-
images
-

the image sequence.

+
+
+ +
+
+
images
+
the image sequence.
-
scenes
-

This character string specifies which scenes to delete (e.g. 1,3-5,-2-6,2).

+
+
scenes
+
This character string specifies which scenes to delete (e.g. 1,3-5,-2-6,2).
-
exception
-

return any errors or warnings in this structure.

+
+
exception
+
return any errors or warnings in this structure.
-
-

DestroyImageList

-
+
+ +

DestroyImageList

DestroyImageList() destroys an image list.

The format of the DestroyImageList method is:

-
-  Image *DestroyImageList(Image *image)
+
+Image *DestroyImageList(Image *image)
 

A description of each parameter follows:

-
image
-

the image sequence.

+
+
-
-

DuplicateImages

-
+
+
+
image
+
the image sequence.
+ +
+
+

DuplicateImages

DuplicateImages() duplicates one or more images from an image sequence, using a count and a comma separated list of image numbers or ranges.

@@ -337,224 +219,290 @@

The format of the DuplicateImages method is:

-
-  Image *DuplicateImages(Image *images,const size_t number_duplicates,
-    const char *scenes,ExceptionInfo *exception)
+
+Image *DuplicateImages(Image *images,const size_t number_duplicates,
+  const char *scenes,ExceptionInfo *exception)
 

A description of each parameter follows:

-
images
-

the image sequence.

+
+
+ +
+
+
images
+
the image sequence.
-
number_duplicates
-

duplicate the image sequence this number of times.

+
+
number_duplicates
+
duplicate the image sequence this number of times.
-
scenes
-

This character string specifies which scenes to duplicate (e.g. 1,3-5,-2-6,2).

+
+
scenes
+
This character string specifies which scenes to duplicate (e.g. 1,3-5,-2-6,2).
-
exception
-

return any errors or warnings in this structure.

+
+
exception
+
return any errors or warnings in this structure.
-
-

GetFirstImageInList

-
+
+ +

GetFirstImageInList

GetFirstImageInList() returns a pointer to the first image in the list.

The format of the GetFirstImageInList method is:

-
-  Image *GetFirstImageInList(const Image *images)
+
+Image *GetFirstImageInList(const Image *images)
 

A description of each parameter follows:

-
images
-

the image list.

+
+
+ +
+
+
images
+
the image list.
+ +
+
+

GetImageFromList

-
-

GetImageFromList

-
+

GetImageFromList() returns an image at the specified index from the image list. Starting with 0 as the first image in the list.

-

GetImageFromList() returns an image at the specified offset from the list.

+

A negative offset will return the image from the end of the list, such that an index of -1 is the last image.

+ +

If no such image exists at the specified offset a NULL image pointer is returned. This will only happen if index is less that the negative of the list length, or larger than list length -1. EG: ( -N to N-1 )

The format of the GetImageFromList method is:

-
-  Image *GetImageFromList(const Image *images,const ssize_t index)
+
+Image *GetImageFromList(const Image *images,const ssize_t index)
 

A description of each parameter follows:

-
images
-

the image list.

+
+
+ +
+
+
images
+
the image list.
-
index
-

the position within the list.

+
+
index
+
the position within the list.
-
-

GetImageIndexInList

-
+
+ +

GetImageIndexInList

GetImageIndexInList() returns the offset in the list of the specified image.

The format of the GetImageIndexInList method is:

-
-  ssize_t GetImageIndexInList(const Image *images)
+
+ssize_t GetImageIndexInList(const Image *images)
 

A description of each parameter follows:

-
images
-

the image list.

+
+
-
-

GetImageListLength

-
+
+
+
images
+
the image list.
+ +
+
+

GetImageListLength

GetImageListLength() returns the length of the list (the number of images in the list).

The format of the GetImageListLength method is:

-
-  size_t GetImageListLength(const Image *images)
+
+size_t GetImageListLength(const Image *images)
 

A description of each parameter follows:

-
images
-

the image list.

+
+
+ +
+
+
images
+
the image list.
-
-

GetLastImageInList

-
+
+ +

GetLastImageInList

GetLastImageInList() returns a pointer to the last image in the list.

The format of the GetLastImageInList method is:

-
-  Image *GetLastImageInList(const Image *images)
+
+Image *GetLastImageInList(const Image *images)
 

A description of each parameter follows:

-
images
-

the image list.

+
+
-
-

GetNextImageInList

-
+
+
+
images
+
the image list.
+ +
+
+

GetNextImageInList

GetNextImageInList() returns the next image in the list.

The format of the GetNextImageInList method is:

-
-  Image *GetNextImageInList(const Image *images)
+
+Image *GetNextImageInList(const Image *images)
 

A description of each parameter follows:

-
images
-

the image list.

+
+
+ +
+
+
images
+
the image list.
-
-

GetPreviousImageInList

-
+
+ +

GetPreviousImageInList

GetPreviousImageInList() returns the previous image in the list.

The format of the GetPreviousImageInList method is:

-
-  Image *GetPreviousImageInList(const Image *images)
+
+Image *GetPreviousImageInList(const Image *images)
 

A description of each parameter follows:

-
images
-

the image list.

+
+
+ +
+
+
images
+
the image list.
+ +
+
+

ImageListToArray

-
-

ImageListToArray

-
+

ImageListToArray() is a convenience method that converts an image list to a sequential array, with a NULL image pointer at the end of the array.

-

ImageListToArray() is a convenience method that converts an image list to a sequential array. For example,

+

The images remain part of the original image list, with the array providing an alternative means of indexing the image array.

-

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);

+

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);

The format of the ImageListToArray method is:

-
-  Image **ImageListToArray(const Image *images,ExceptionInfo *exception)
+
+Image **ImageListToArray(const Image *images,ExceptionInfo *exception)
 

A description of each parameter follows:

-
image
-

the image list.

+
+
-
exception
-

return any errors or warnings in this structure.

+
+
+
image
+
the image list.
-
-

InsertImageInList

-
+
+
exception
+
return any errors or warnings in this structure.
-

InsertImageInList() inserts the second image or image list into the first image list immediately after the image pointed to. The given image list pointer is unchanged unless previously empty.

+
+ +

InsertImageInList

+ +

InsertImageInList() insert the given image or image list, into the first image list, immediately AFTER the image pointed to. The given image list pointer is left unchanged unless previously empty.

The format of the InsertImageInList method is:

-
-  InsertImageInList(Image **images,Image *image)
+
+InsertImageInList(Image **images,Image *insert)
 

A description of each parameter follows:

-
images
-

the image list to insert into.

+
+
+ +
+
+
images
+
the image list to insert into.
-
image
-

the image list to insert.

+
+
insert
+
the image list to insert.
-
-

NewImageList

-
+
+ +

NewImageList

NewImageList() creates an empty image list.

The format of the NewImageList method is:

-
-  Image *NewImageList(void)
+
+Image *NewImageList(void)
 
-
-

PrependImageToList

-
+

PrependImageToList

PrependImageToList() prepends the image to the beginning of the list.

The format of the PrependImageToList method is:

-
-  PrependImageToList(Image *images,Image *image)
+
+PrependImageToList(Image *images,Image *image)
 

A description of each parameter follows:

-
images
-

the image list.

+
+
-
image
-

the image.

+
+
+
images
+
the image list.
-
-

RemoveImageFromList

-
+
+
image
+
the image.
+ +
+ +

RemoveImageFromList

RemoveImageFromList() removes and returns the image pointed to.

@@ -562,18 +510,23 @@

The format of the RemoveImageFromList method is:

-
-  Image *RemoveImageFromList(Image **images)
+
+Image *RemoveImageFromList(Image **images)
 

A description of each parameter follows:

-
images
-

the image list.

+
+
+ +
+
+
images
+
the image list.
-
-

RemoveFirstImageFromList

-
+
+ +

RemoveFirstImageFromList

RemoveFirstImageFromList() removes and returns the first image in the list.

@@ -581,18 +534,23 @@

The format of the RemoveFirstImageFromList method is:

-
-  Image *RemoveFirstImageFromList(Image **images)
+
+Image *RemoveFirstImageFromList(Image **images)
 

A description of each parameter follows:

-
images
-

the image list.

+
+
-
-

RemoveLastImageFromList

-
+
+
+
images
+
the image list.
+ +
+
+

RemoveLastImageFromList

RemoveLastImageFromList() removes and returns the last image from the list.

@@ -600,142 +558,168 @@

The format of the RemoveLastImageFromList method is:

-
-  Image *RemoveLastImageFromList(Image **images)
+
+Image *RemoveLastImageFromList(Image **images)
 

A description of each parameter follows:

-
images
-

the image list.

+
+
+ +
+
+
images
+
the image list.
-
-

ReplaceImageInList

-
+
+ +

ReplaceImageInList

-

ReplaceImageInList() replaces an image in the list with the given image, or list of images. Old image is destroyed. The image list pointer is set to point to the first image of the inserted list of images.

+

ReplaceImageInList() replaces an image in the list with the given image, or list of images. Old image is destroyed.

+ +

The images list pointer is set to point to the first image of the inserted list of images.

The format of the ReplaceImageInList method is:

-
-  ReplaceImageInList(Image **images,Image *image)
+
+ReplaceImageInList(Image **images,Image *replace)
 

A description of each parameter follows:

-
images
-

the list and pointer to image to replace

+
+
+ +
+
+
images
+
the list and pointer to image to replace
-
image
-

the image or image list replacing the original

+
+
replace
+
the image or image list replacing the original
-
-

ReplaceImageInListReturnLast

-
+
+ +

ReplaceImageInListReturnLast

-

ReplaceImageInListReturnLast() is exactly as ReplaceImageInList() except the image pointer is set to the last image in the list.

+

ReplaceImageInListReturnLast() is exactly as ReplaceImageInList() except the images pointer is set to the last image in the list of replacemen images.

-

This allows you to simply use 'next' to go to the image that follows the just replaced image.

+

This allows you to simply use GetNextImageInList() to go to the image that follows the just replaced image, even if a list of replacement images was inserted.

The format of the ReplaceImageInList method is:

-
-  ReplaceImageInListReturnLast(Image **images,Image *image)
+
+ReplaceImageInListReturnLast(Image **images,Image *replace)
 

A description of each parameter follows:

-
images
-

the list and pointer to image to replace

+
+
-
image
-

the image or image list replacing the original

+
+
+
images
+
the list and pointer to image to replace
-
-

ReverseImageList

-
+
+
replace
+
the image or image list replacing the original
+ +
+ +

ReverseImageList

ReverseImageList() reverses the order of an image list. The list pointer is reset to that start of the re-ordered list.

The format of the ReverseImageList method is:

-
-  void ReverseImageList(Image **images)
+
+void ReverseImageList(Image **images)
 

A description of each parameter follows:

-
images
-

the image list.

+
+
+ +
+
+
images
+
the image list.
-
-

SpliceImageIntoList

-
+
+ +

SpliceImageIntoList

SpliceImageIntoList() removes 'length' images from the list and replaces them with the specified splice. Removed images are returned.

The format of the SpliceImageIntoList method is:

-
-  SpliceImageIntoList(Image **images,const size_t,
-    const Image *splice)
+
+SpliceImageIntoList(Image **images,const size_t,
+  const Image *splice)
 

A description of each parameter follows:

-
images
-

the image list.

+
+
+ +
+
+
images
+
the image list.
-
length
-

the length of the image list to remove.

+
+
length
+
the length of the image list to remove.
-
splice
-

Replace the removed image list with this list.

+
+
splice
+
Replace the removed image list with this list.
-
-

SplitImageList

-
+
+ +

SplitImageList

SplitImageList() splits an image into two lists, after given image The list that was split off is returned, which may be empty.

The format of the SplitImageList method is:

-
-  Image *SplitImageList(Image *images)
+
+Image *SplitImageList(Image *images)
 

A description of each parameter follows:

-
images
-

the image list.

- -
- -
- - - -
- - - +
+
+ +
+
+
images
+
the image list.
+ +
+
+
+ +
+ + +
+ +