diff options
| author | Brianna | 2017-06-25 10:40:48 -0400 |
|---|---|---|
| committer | GitHub | 2017-06-25 10:40:48 -0400 |
| commit | 55423ca4aa206ec9a082942ca89da7dcb4f452bc (patch) | |
| tree | c65d2d5c908f472389dee4d1e03f8fe88e88dacf /src/components/color.py | |
| parent | 1bb67d1513122ca7fb02e60a92339bd1a73dbee3 (diff) | |
| parent | a2838a0c3898f999e71f76e6e8d5691155438aea (diff) | |
Merge pull request #35 from djfun/newgui-bugfixes
Newgui bugfixes
Diffstat (limited to 'src/components/color.py')
| -rw-r--r-- | src/components/color.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/components/color.py b/src/components/color.py index f1fb2b2..253ac83 100644 --- a/src/components/color.py +++ b/src/components/color.py @@ -1,5 +1,5 @@ from PIL import Image, ImageDraw -from PyQt5 import uic, QtGui, QtCore, QtWidgets +from PyQt5 import QtGui, QtCore, QtWidgets from PyQt5.QtGui import QColor from PIL.ImageQt import ImageQt import os @@ -13,8 +13,7 @@ class Component(__base__.Component): def widget(self, parent): self.parent = parent - page = uic.loadUi(os.path.join( - os.path.dirname(os.path.realpath(__file__)), 'color.ui')) + page = self.loadUi('color.ui') self.color1 = (0, 0, 0) self.color2 = (133, 133, 133) @@ -177,7 +176,7 @@ class Component(__base__.Component): self.sizeWidth, self.sizeHeight ) painter.end() - imBytes = image.bits().asstring(image.numBytes()) + imBytes = image.bits().asstring(image.byteCount()) return Image.frombytes('RGBA', (width, height), imBytes) def loadPreset(self, pr, presetName=None): |
