Example #1
0
func (im *MagickImage) SetImageType(tp ImageType) (err error) {
	c_img_type := C.ImageType(tp)
	ok := C.SetImageType(im.Image, c_img_type)
	if ok == C.MagickFalse {
		return &MagickError{"error", "", "could not set image type"}
	}
	return
}
Example #2
0
func (self *Canvas) SetType(imageType uint) error {
	var status C.MagickBooleanType

	status = C.MagickSetImageType(self.wand, C.ImageType(imageType))

	if status == C.MagickFalse {
		return fmt.Errorf("Could not set type: %s", self.Error())
	}

	return nil
}
Example #3
0
// Sets the image type attribute.
func (mw *MagickWand) SetType(itype ImageType) error {
	C.MagickSetType(mw.mw, C.ImageType(itype))
	return mw.GetLastError()
}
Example #4
0
// Sets the image type attribute.
func (mw *MagickWand) SetType(itype ImageType) error {
	ok := C.MagickSetType(mw.mw, C.ImageType(itype))
	return mw.getLastErrorIfFailed(ok)
}