コード例 #1
0
func (self *PixelIterator) Error() error {
	var exception C.ExceptionType

	ptr := C.PixelGetIteratorException(self.iterator, &exception)
	message := C.GoString(ptr)

	C.PixelClearIteratorException(self.iterator)
	C.MagickRelinquishMemory(unsafe.Pointer(ptr))

	return errors.New(message)
}
コード例 #2
0
// Clears any exceptions associated with the iterator
func (pi *PixelIterator) clearException() bool {
	return 1 == C.int(C.PixelClearIteratorException(pi.pi))
}