def __setitem__(self, point, color):
        """Set a single pixel to a given color.

        This is "slow", in the sense that you probably don't want to do this to
        edit every pixel in an entire image.
        """
        point = Vector.coerce(point)
        rgb = color.rgb()

        # TODO retval is t/f
        with magick_try() as exc:
            # Surprise!  GetOneCacheViewAuthenticPixel doesn't actually respect
            # writes, even though the docs explicitly says it does.
            # So get a view of this single pixel instead.
            px = lib.GetCacheViewAuthenticPixels(
                self._ptr, point.x, point.y, 1, 1, exc.ptr)
            exc.check(px == ffi.NULL)

        array = ffi.new("double[]", [rgb._red, rgb._green, rgb._blue, rgb._opacity])
        lib.sanpera_pixel_from_doubles(px, array)
        #print(repr(ffi.buffer(ffi.cast("char*", ffi.cast("void*", px)), 16)[:]))

        with magick_try() as exc:
            assert lib.SyncCacheViewAuthenticPixels(self._ptr, exc.ptr)
dataset/ETHPy150Open eevee/sanpera/sanpera/pixel_view.py/PixelView.__setitem__/original