# layer.c File Reference

`#include "magick/studio.h"`
`#include "magick/artifact.h"`
`#include "magick/color.h"`
`#include "magick/color-private.h"`
`#include "magick/composite.h"`
`#include "magick/effect.h"`
`#include "magick/exception.h"`
`#include "magick/exception-private.h"`
`#include "magick/geometry.h"`
`#include "magick/image.h"`
`#include "magick/layer.h"`
`#include "magick/list.h"`
`#include "magick/memory_.h"`
`#include "magick/monitor.h"`
`#include "magick/pixel-private.h"`
`#include "magick/property.h"`
`#include "magick/profile.h"`
`#include "magick/resource_.h"`
`#include "magick/resize.h"`
`#include "magick/statistic.h"`
`#include "magick/string_.h"`
`#include "magick/transform.h"`

## Defines

#define | DupDispose ((DisposeType)9)
#define | DelDispose ((DisposeType)8)
#define | MergeLayersTag "Merge/Layers"

## Functions

static void | ClearBounds (Image *image, RectangleInfo *bounds)
static MagickBooleanType | IsBoundsCleared (const Image *image1, const Image *image2, RectangleInfo *bounds, ExceptionInfo *exception)
MagickExport Image * | CoalesceImages (const Image *image, ExceptionInfo *exception)
MagickExport Image * | DisposeImages (const Image *image, ExceptionInfo *exception)
static MagickBooleanType | ComparePixels (const ImageLayerMethod method, const MagickPixelPacket *p, const MagickPixelPacket *q)
static RectangleInfo | CompareImageBounds (const Image *image1, const Image *image2, const ImageLayerMethod method, ExceptionInfo *exception)
MagickExport Image * | CompareImageLayers (const Image *image, const ImageLayerMethod method, ExceptionInfo *exception)
MagickExport Image * | DeconstructImages (const Image *images, ExceptionInfo *exception)
static Image * | OptimizeLayerFrames (const Image *image, const ImageLayerMethod method, ExceptionInfo *exception)
MagickExport Image * | OptimizeImageLayers (const Image *image, ExceptionInfo *exception)
MagickExport Image * | OptimizePlusImageLayers (const Image *image, ExceptionInfo *exception)
MagickExport void | OptimizeImageTransparency (const Image *image, ExceptionInfo *exception)
MagickExport void | RemoveDuplicateLayers (Image **images, ExceptionInfo *exception)
MagickExport void | RemoveZeroDelayLayers (Image **images, ExceptionInfo *exception)
static void | CompositeCanvas (Image *destination, const CompositeOperator compose, Image *source, long x_offset, long y_offset)
MagickExport void | CompositeLayers (Image *destination, const CompositeOperator compose, Image *source, const long x_offset, const long y_offset, ExceptionInfo *exception)
MagickExport Image * | MergeImageLayers (const Image *image, const ImageLayerMethod method, ExceptionInfo *exception)

## Define Documentation

#define DelDispose ((DisposeType)8)

#define DupDispose ((DisposeType)9)

#define MergeLayersTag "Merge/Layers"

## Function Documentation

static void ClearBounds | ( | Image * | image,
|  | RectangleInfo * | bounds |
| ) |  |  | `[static]`

MagickExport Image* CoalesceImages | ( | const Image * | image,
|  | ExceptionInfo * | exception |
| ) |  |  |

static RectangleInfo CompareImageBounds | ( | const Image * | image1,
|  | const Image * | image2,
|  | const ImageLayerMethod | method,
|  | ExceptionInfo * | exception |
| ) |  |  | `[static]`

MagickExport Image* CompareImageLayers | ( | const Image * | image,
|  | const ImageLayerMethod | method,
|  | ExceptionInfo * | exception |
| ) |  |  |

static MagickBooleanType ComparePixels | ( | const ImageLayerMethod | method,
|  | const MagickPixelPacket * | p,
|  | const MagickPixelPacket * | q |
| ) |  |  | `[static]`

static void CompositeCanvas | ( | Image * | destination,
|  | const CompositeOperator | compose,
|  | Image * | source,
|  | long | x_offset,
|  | long | y_offset |
| ) |  |  | `[inline, static]`

MagickExport void CompositeLayers | ( | Image * | destination,
|  | const CompositeOperator | compose,
|  | Image * | source,
|  | const long | x_offset,
|  | const long | y_offset,
|  | ExceptionInfo * | exception |
| ) |  |  |

MagickExport Image* DeconstructImages | ( | const Image * | images,
|  | ExceptionInfo * | exception |
| ) |  |  |

MagickExport Image* DisposeImages | ( | const Image * | image,
|  | ExceptionInfo * | exception |
| ) |  |  |

static MagickBooleanType IsBoundsCleared | ( | const Image * | image1,
|  | const Image * | image2,
|  | RectangleInfo * | bounds,
|  | ExceptionInfo * | exception |
| ) |  |  | `[static]`

MagickExport Image* MergeImageLayers | ( | const Image * | image,
|  | const ImageLayerMethod | method,
|  | ExceptionInfo * | exception |
| ) |  |  |

MagickExport Image* OptimizeImageLayers | ( | const Image * | image,
|  | ExceptionInfo * | exception |
| ) |  |  |

MagickExport void OptimizeImageTransparency | ( | const Image * | image,
|  | ExceptionInfo * | exception |
| ) |  |  |

static Image* OptimizeLayerFrames | ( | const Image * | image,
|  | const ImageLayerMethod | method,
|  | ExceptionInfo * | exception |
| ) |  |  | `[static]`

MagickExport Image* OptimizePlusImageLayers | ( | const Image * | image,
|  | ExceptionInfo * | exception |
| ) |  |  |

MagickExport void RemoveDuplicateLayers | ( | Image ** | images,
|  | ExceptionInfo * | exception |
| ) |  |  |

MagickExport void RemoveZeroDelayLayers | ( | Image ** | images,
|  | ExceptionInfo * | exception |
| ) |  |  |