Make GlyphDB store GlyphData objects instead of just text.
This commit is contained in:
parent
a44091b570
commit
9c8de1ce0f
6 changed files with 90 additions and 53 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue