![]() |
![]() |
![]() |
![]() |
[
About ImageMagick
Command-line Tools
Program Interfaces
] [ Install from Source Binary Releases Resources ] [ Download ] [ Links ] [ Sponsors Free Forum Hosting ] |
CoalesceImages() composites a set of images while respecting any page offsets and disposal methods. GIF, MIFF, and MNG animation sequences typically start with an image background and each subsequent image varies in size and offset. CoalesceImages() returns a new sequence where each image in the sequence is the same size as the first and composited with the next image in the sequence. The format of the CoalesceImages method is: Image *CoalesceImages(Image *image,ExceptionInfo *exception) A description of each parameter follows: imageThe image sequence. exceptionReturn any errors or warnings in this structure. CompareImageLayers() compares each image with the next in a sequence and returns the minimum bounding region of all the pixel differences (of the LayerType specified) it discovers. Images do NOT have to be the same size, though it is best that all the images are fully 'coalesced' (images are all the same size, on a flattened canvas, and represent how an specific frame should look is animatated). If images are not the same size as the page canvas size of first image, then it is alpha composed using 'Copy' onto the previous frame compared. That is the differences only within the overlay area are looked at. No dispose methods are applied, though this does not matter for animations which are a fully coalesced sequence of images. The format of the CompareImageLayers method is: Image *CompareImageLayers(const Image *images, const MagickLayerMethod method,ExceptionInfo *exception) A description of each parameter follows: imageThe image. methodThe layers type to compare images with. Must be one of... CompareAnyLayer, CompareClearLayer, CompareOverlayLayer. exceptionReturn any errors or warnings in this structure. DeconstructImages() compares each image with the next in a sequence and returns the minimum bounding region of all differences from the first image. The format of the CompareImageLayers method is: Image *DeconstructImages(const Image *images, ExceptionInfo *exception) A description of each parameter follows: imageThe image. exceptionReturn any errors or warnings in this structure. OptimizeImageLayers() compares each image the GIF disposed forms of the previous image in the sequence. From this it attempts to select the smallest cropped image to replace each frame, while preserving the results of the animation. Note that this is not easy, and may require the expandsion of the bounds of previous frame, to clear pixels, using Background Disposal. The format of the OptimizeImageLayers method is: Image *OptimizeImageLayers(const Image *image,ExceptionInfo *exception) A description of each parameter follows: imageThe image. exceptionReturn any errors or warnings in this structure. |