func (mw *MagickWand) ClipImage() error {
	ok := C.MagickClipImage(mw.mw)
	return mw.getLastErrorIfFailed(ok)
}
Clips along the first path from the 8BIM profile, if present
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)
}