func (mw *MagickWand) GetImageDispose() DisposeType {
	return DisposeType(C.MagickGetImageDispose(mw.mw))
}
Gets the image disposal method.
package gmagick
import "C"
import (
	"errors"
	"os"
	"runtime"
	"sync"
	"sync/atomic"
	"syscall"
	"unsafe"
)
type MagickWand struct {
	mw   *C.MagickWand
	init sync.Once
}
func newMagickWand(cmw *C.MagickWand) *MagickWand {
	mw := &MagickWand{mw: cmw}
	runtime.SetFinalizer(mw, Destroy)
	mw.IncreaseCount()
	return mw
}
func NewMagickWand() *MagickWand {
	return newMagickWand(C.NewMagickWand())
}
func (mw *MagickWand) Clone() *MagickWand {
	return newMagickWand(C.CloneMagickWand(mw.mw))
}
func (mw *MagickWand) Destroy() {
	if mw.mw == nil {
		return
	}
	mw.init.Do(func() {
		C.DestroyMagickWand(mw.mw)
		mw.mw = nil
		mw.DecreaseCount()
	})
}
func (mw *MagickWand) IncreaseCount() {
	atomic.AddInt64(&magickWandCounter, int64(1))
	unsetCanTerminate()
}
func (mw *MagickWand) DecreaseCount() {
	atomic.AddInt64(&magickWandCounter, int64(-1))
	setCanTerminate()
}
func (mw *MagickWand) GetImageIndex() uint {
	return uint(C.MagickGetImageIndex(mw.mw))
}
func (mw *MagickWand) AdaptiveThresholdImage(width, height uint, offset int) error {
	ok := C.MagickAdaptiveThresholdImage(mw.mw, C.ulong(width), C.ulong(height), C.long(offset))
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) AddImage(wand *MagickWand) error {
	ok := C.MagickAddImage(mw.mw, wand.mw)
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) AddNoiseImage(noiseType NoiseType) error {
	ok := C.MagickAddNoiseImage(mw.mw, C.NoiseType(noiseType))
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) AffineTransformImage(drawingWand *DrawingWand) error {
	ok := C.MagickAffineTransformImage(mw.mw, drawingWand.dw)
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) AnimateImages(server string) error {
	csserver := C.CString(server)
	defer C.free(unsafe.Pointer(csserver))
	ok := C.MagickAnimateImages(mw.mw, csserver)
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) AnnotateImage(drawingWand *DrawingWand, x, y, angle float64, text string) error {
	cstext := C.CString(text)
	defer C.free(unsafe.Pointer(cstext))
	ok := C.MagickAnnotateImage(mw.mw, drawingWand.dw, C.double(x), C.double(y), C.double(angle), cstext)
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) AppendImages(topToBottom bool) *MagickWand {
	return newMagickWand(C.MagickAppendImages(mw.mw, b2i(topToBottom)))
}
func (mw *MagickWand) AverageImages() *MagickWand {
	return newMagickWand(C.MagickAverageImages(mw.mw))
}
func (mw *MagickWand) BlackThresholdImage(threshold *PixelWand) error {
	ok := C.MagickBlackThresholdImage(mw.mw, threshold.pw)
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) BlurImage(radius, sigma float64) error {
	ok := C.MagickBlurImage(mw.mw, C.double(radius), C.double(sigma))
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) BorderImage(borderColor *PixelWand, width, height uint) error {
	ok := C.MagickBorderImage(mw.mw, borderColor.pw, C.ulong(width), C.ulong(height))
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) CharcoalImage(radius, sigma float64) error {
	ok := C.MagickCharcoalImage(mw.mw, C.double(radius), C.double(sigma))
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) ChopImage(width, height uint, x, y int) error {
	ok := C.MagickChopImage(mw.mw, C.ulong(width), C.ulong(height), C.long(x), C.long(y))
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) ClipImage() error {
	ok := C.MagickClipImage(mw.mw)
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) CoalesceImages() *MagickWand {
	return newMagickWand(C.MagickCoalesceImages(mw.mw))
}
func (mw *MagickWand) ColorizeImage(colorize, opacity *PixelWand) error {
	ok := C.MagickColorizeImage(mw.mw, colorize.pw, opacity.pw)
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) CommentImage(comment string) error {
	cscomment := C.CString(comment)
	defer C.free(unsafe.Pointer(cscomment))
	ok := C.MagickCommentImage(mw.mw, cscomment)
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) CompareImageChannels(reference *MagickWand, channel ChannelType, metric MetricType) (wand *MagickWand, distortion float64) {
	cmw := C.MagickCompareImageChannels(mw.mw, reference.mw, C.ChannelType(channel), C.MetricType(metric), (*C.double)(&distortion))
	wand = newMagickWand(cmw)
	return
}
func (mw *MagickWand) CompareImages(reference *MagickWand, metric MetricType) (wand *MagickWand, distortion float64) {
	cmw := C.MagickCompareImages(mw.mw, reference.mw, C.MetricType(metric), (*C.double)(&distortion))
	wand = newMagickWand(cmw)
	return
}
func (mw *MagickWand) CompositeImage(source *MagickWand, compose CompositeOperator, x, y int) error {
	ok := C.MagickCompositeImage(mw.mw, source.mw, C.CompositeOperator(compose), C.long(x), C.long(y))
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) ContrastImage(sharpen bool) error {
	ok := C.MagickContrastImage(mw.mw, b2i(sharpen))
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) ConvolveImage(order uint, kernel []float64) error {
	ok := C.MagickConvolveImage(mw.mw, C.ulong(order), (*C.double)(&kernel[0]))
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) CropImage(width, height uint, x, y int) error {
	ok := C.MagickCropImage(mw.mw, C.ulong(width), C.ulong(height), C.long(x), C.long(y))
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) CycleColormapImage(displace int) error {
	ok := C.MagickCycleColormapImage(mw.mw, C.long(displace))
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) DeconstructImages() *MagickWand {
	return newMagickWand(C.MagickDeconstructImages(mw.mw))
}
func (mw *MagickWand) DescribeImage() string {
	description := C.MagickDescribeImage(mw.mw)
	defer C.MagickRelinquishMemory(unsafe.Pointer(description))
	return C.GoString(description)
}
func (mw *MagickWand) DespeckleImage() error {
	ok := C.MagickDespeckleImage(mw.mw)
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) DisplayImage(server string) error {
	cstring := C.CString(server)
	defer C.free(unsafe.Pointer(cstring))
	ok := C.MagickDisplayImage(mw.mw, cstring)
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) DisplayImages(server string) error {
	cstring := C.CString(server)
	defer C.free(unsafe.Pointer(cstring))
	ok := C.MagickDisplayImages(mw.mw, cstring)
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) DrawImage(dw *DrawingWand) error {
	ok := C.MagickDrawImage(mw.mw, dw.dw)
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) EdgeImage(radius float64) error {
	ok := C.MagickEdgeImage(mw.mw, C.double(radius))
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) EmbossImage(radius, sigma float64) error {
	ok := C.MagickEmbossImage(mw.mw, C.double(radius), C.double(sigma))
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) EnhanceImage() error {
	ok := C.MagickEnhanceImage(mw.mw)
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) EqualizeImage() error {
	ok := C.MagickEqualizeImage(mw.mw)
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) ExtentImage(width, height uint, x, y int) error {
	ok := C.MagickExtentImage(mw.mw, C.size_t(width), C.size_t(height), C.ssize_t(x), C.ssize_t(y))
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) FlipImage() error {
	ok := C.MagickFlipImage(mw.mw)
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) FlopImage() error {
	ok := C.MagickFlopImage(mw.mw)
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) FrameImage(matteColor *PixelWand, width, height uint, innerBevel, outerBevel int) error {
	ok := C.MagickFrameImage(mw.mw, matteColor.pw, C.ulong(width), C.ulong(height), C.long(innerBevel), C.long(outerBevel))
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) FxImage(expression string) (fxmw *MagickWand, err error) {
	csexpression := C.CString(expression)
	defer C.free(unsafe.Pointer(csexpression))
	fxmw = newMagickWand(C.MagickFxImage(mw.mw, csexpression))
	err = mw.GetLastError()
	return
}
func (mw *MagickWand) FxImageChannel(channel ChannelType, expression string) *MagickWand {
	csexpression := C.CString(expression)
	defer C.free(unsafe.Pointer(csexpression))
	return newMagickWand(C.MagickFxImageChannel(mw.mw, C.ChannelType(channel), csexpression))
}
func (mw *MagickWand) GammaImage(gamma float64) error {
	ok := C.MagickGammaImage(mw.mw, C.double(gamma))
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) GammaImageChannel(channel ChannelType, gamma float64) error {
	ok := C.MagickGammaImageChannel(mw.mw, C.ChannelType(channel), C.double(gamma))
	return mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) GetFilename() string {
	p := C.MagickGetFilename(mw.mw)
	defer C.MagickRelinquishMemory(unsafe.Pointer(p))
	return C.GoString(p)
}
func (mw *MagickWand) GetImageAttribute(attributeName string) string {
	n := C.CString(attributeName)
	defer C.free(unsafe.Pointer(n))
	p := C.MagickGetImageAttribute(mw.mw, n)
	defer C.MagickRelinquishMemory(unsafe.Pointer(p))
	return C.GoString(p)
}
func (mw *MagickWand) GetImageBackgroundColor() (bgColor *PixelWand, err error) {
	cbgcolor := NewPixelWand()
	ok := C.MagickGetImageBackgroundColor(mw.mw, cbgcolor.pw)
	return cbgcolor, mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) GetImageBluePrimary() (x, y float64, err error) {
	ok := C.MagickGetImageBluePrimary(mw.mw, (*C.double)(&x), (*C.double)(&y))
	err = mw.getLastErrorIfFailed(ok)
	return
}
func (mw *MagickWand) GetImageBorderColor() (borderColor *PixelWand, err error) {
	cbc := NewPixelWand()
	ok := C.MagickGetImageBorderColor(mw.mw, cbc.pw)
	return cbc, mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) GetImageChannelDepth(channel ChannelType) uint {
	return uint(C.MagickGetImageChannelDepth(mw.mw, C.ChannelType(channel)))
}
func (mw *MagickWand) GetImageChannelMean(channel ChannelType) (mean, stdev float64, err error) {
	ok := C.MagickGetImageChannelMean(mw.mw, C.ChannelType(channel), (*C.double)(&mean), (*C.double)(&stdev))
	err = mw.getLastErrorIfFailed(ok)
	return
}
func (mw *MagickWand) GetImageColormapColor(index uint) (color *PixelWand, err error) {
	cpw := NewPixelWand()
	ok := C.MagickGetImageColormapColor(mw.mw, C.ulong(index), cpw.pw)
	return cpw, mw.getLastErrorIfFailed(ok)
}
func (mw *MagickWand) GetImageColors() uint {
	return uint(C.MagickGetImageColors(mw.mw))
}
func (mw *MagickWand) GetImageColorspace() ColorspaceType {
	return ColorspaceType(C.MagickGetImageColorspace(mw.mw))
}
func (mw *MagickWand) GetImageCompose() CompositeOperator {
	return CompositeOperator(C.MagickGetImageCompose(mw.mw))
}
func (mw *MagickWand) GetImageCompression() CompressionType {
	return CompressionType(C.MagickGetImageCompression(mw.mw))
}
func (mw *MagickWand) GetImageDelay() uint {
	return uint(C.MagickGetImageDelay(mw.mw))
}
func (mw *MagickWand) GetImageDepth() uint {
	return uint(C.MagickGetImageDepth(mw.mw))
}