mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 01:16:16 +03:00
Some landscape.io fixes
This commit is contained in:
parent
6d1dda76bb
commit
c859e3bf40
|
@ -20,7 +20,6 @@
|
|||
from PIL import Image
|
||||
from PIL._util import isStringType
|
||||
import operator
|
||||
import math
|
||||
from functools import reduce
|
||||
|
||||
|
||||
|
|
|
@ -21,16 +21,16 @@ from PIL._util import isPath
|
|||
import sys
|
||||
|
||||
if 'PyQt4.QtGui' not in sys.modules:
|
||||
try:
|
||||
from PyQt5.QtGui import QImage, qRgba
|
||||
except:
|
||||
try:
|
||||
from PyQt4.QtGui import QImage, qRgba
|
||||
from PyQt5.QtGui import QImage, qRgba
|
||||
except:
|
||||
from PySide.QtGui import QImage, qRgba
|
||||
try:
|
||||
from PyQt4.QtGui import QImage, qRgba
|
||||
except:
|
||||
from PySide.QtGui import QImage, qRgba
|
||||
|
||||
else: #PyQt4 is used
|
||||
from PyQt4.QtGui import QImage, qRgba
|
||||
from PyQt4.QtGui import QImage, qRgba
|
||||
|
||||
##
|
||||
# (Internal) Turns an RGB color into a Qt compatible color integer.
|
||||
|
|
|
@ -227,3 +227,9 @@ class TestBoxBlur(PillowTestCase):
|
|||
passes=3,
|
||||
delta=1,
|
||||
)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
# End of file
|
||||
|
|
|
@ -30,9 +30,9 @@ class TestFileGif(PillowTestCase):
|
|||
|
||||
def test_grayscale(optimize):
|
||||
im = Image.new("L", (1, 1), 0)
|
||||
file = BytesIO()
|
||||
im.save(file, "GIF", optimize=optimize)
|
||||
return len(file.getvalue())
|
||||
filename = BytesIO()
|
||||
im.save(filename, "GIF", optimize=optimize)
|
||||
return len(filename.getvalue())
|
||||
|
||||
def test_bilevel(optimize):
|
||||
im = Image.new("1", (1, 1), 0)
|
||||
|
|
Loading…
Reference in New Issue
Block a user