diff --git a/pixelocr/image.py b/pixelocr/image.py index ac9ee2c..2d7b6a6 100644 --- a/pixelocr/image.py +++ b/pixelocr/image.py @@ -66,6 +66,11 @@ class Image(object): y = self.y + ystart return Image(self.data[key], x, y) + def space(self, x, y, width, height): + data = np.zeros((height, width, self.shape[2]), dtype=self.data.dtype) + data.fill(255) + return Image(data, x, y) + def _repr_png_(self): buf = BytesIO() imsave(buf, self.data)