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.
This commit is contained in:
Andrey Golovizin 2014-08-10 21:39:41 +02:00
parent b5194ca018
commit 0ae6f19e60

View file

@ -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.