Make GlyphDB store GlyphData objects instead of just text.

This commit is contained in:
Andrey Golovizin 2014-09-01 17:15:21 +02:00
parent a44091b570
commit 9c8de1ce0f
6 changed files with 90 additions and 53 deletions

View file

@ -185,7 +185,8 @@ class Image(object):
array = np.fromstring(data, dtype=np.uint8).reshape(shape)
return cls(array)
def toqimage(self):
@cached_property
def qimage(self):
from PyQt4.QtGui import QImage
return QImage(
self.data.astype(np.uint8).data,