func (im *Image) setPixels(r *Rect, src *C.PixelPacket, ex *C.ExceptionInfo) bool { dst := C.GetAuthenticPixels(im.image, C.ssize_t(r.X), C.ssize_t(r.Y), C.size_t(r.Width), C.size_t(r.Height), ex) if dst == nil { return false } C.copy_pixel_packets(src, dst, C.int(r.Width*r.Height)) if C.SyncAuthenticPixels(im.image, ex) != C.MagickTrue { return false } return true }
func (im *Image) setPixels(r *Rect, src *C.PixelPacket, ex *C.ExceptionInfo) bool { dst := C.SetImagePixelsEx(im.image, C.long(r.X), C.long(r.Y), C.ulong(r.Width), C.ulong(r.Height), ex) if dst == nil { return false } C.copy_pixel_packets(src, dst, C.int(r.Width*r.Height)) if C.SyncImagePixelsEx(im.image, ex) != C.MagickPass { return false } return true }