示例#1
0
文件: magick.go 项目: aliksend/magick
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
}
示例#2
0
文件: canvas.go 项目: phacops/canvas
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
}
示例#3
0
// Sets the image type attribute.
func (mw *MagickWand) SetType(itype ImageType) error {
	C.MagickSetType(mw.mw, C.ImageType(itype))
	return mw.GetLastError()
}
示例#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)
}