mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +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 import Image
|
||||||
from PIL._util import isStringType
|
from PIL._util import isStringType
|
||||||
import operator
|
import operator
|
||||||
import math
|
|
||||||
from functools import reduce
|
from functools import reduce
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,16 +21,16 @@ from PIL._util import isPath
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
if 'PyQt4.QtGui' not in sys.modules:
|
if 'PyQt4.QtGui' not in sys.modules:
|
||||||
try:
|
|
||||||
from PyQt5.QtGui import QImage, qRgba
|
|
||||||
except:
|
|
||||||
try:
|
try:
|
||||||
from PyQt4.QtGui import QImage, qRgba
|
from PyQt5.QtGui import QImage, qRgba
|
||||||
except:
|
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
|
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.
|
# (Internal) Turns an RGB color into a Qt compatible color integer.
|
||||||
|
|
|
@ -227,3 +227,9 @@ class TestBoxBlur(PillowTestCase):
|
||||||
passes=3,
|
passes=3,
|
||||||
delta=1,
|
delta=1,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
||||||
|
|
||||||
|
# End of file
|
||||||
|
|
|
@ -30,9 +30,9 @@ class TestFileGif(PillowTestCase):
|
||||||
|
|
||||||
def test_grayscale(optimize):
|
def test_grayscale(optimize):
|
||||||
im = Image.new("L", (1, 1), 0)
|
im = Image.new("L", (1, 1), 0)
|
||||||
file = BytesIO()
|
filename = BytesIO()
|
||||||
im.save(file, "GIF", optimize=optimize)
|
im.save(filename, "GIF", optimize=optimize)
|
||||||
return len(file.getvalue())
|
return len(filename.getvalue())
|
||||||
|
|
||||||
def test_bilevel(optimize):
|
def test_bilevel(optimize):
|
||||||
im = Image.new("1", (1, 1), 0)
|
im = Image.new("1", (1, 1), 0)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user