From 0ae6f19e60ec4972c3238517bdd8097d8894dfc0 Mon Sep 17 00:00:00 2001 From: Andrey Golovizin Date: Sun, 10 Aug 2014 21:39:41 +0200 Subject: [PATCH] Make Image.unframe() return a new image, not a SubImage. This is to make line and letter absolute positions relative to the page, not to the original framed image. --- pixelocr/image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pixelocr/image.py b/pixelocr/image.py index ebb1177..3cac64c 100644 --- a/pixelocr/image.py +++ b/pixelocr/image.py @@ -130,7 +130,7 @@ class Image(object): raise NotImplementedError def unframe(self, width=2): - return self[width:-width,width:-width] + return Image(self.data[width:-width,width:-width]) def strip(self): """Strip top and bottom blank space.