mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-30 09:53:39 +03:00
Revert, i didn't meant to commit it
This commit is contained in:
parent
1c9a84d760
commit
9369a48457
|
@ -9,15 +9,15 @@ import sys
|
||||||
import sysconfig
|
import sysconfig
|
||||||
import tempfile
|
import tempfile
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from typing import List
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from packaging.version import parse as parse_version
|
from packaging.version import parse as parse_version
|
||||||
|
|
||||||
from PIL import Image, ImageChops, ImageMath, features
|
from PIL import Image, ImageMath, features
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
HAS_UPLOADER = False
|
HAS_UPLOADER = False
|
||||||
|
|
||||||
if os.environ.get("SHOW_ERRORS"):
|
if os.environ.get("SHOW_ERRORS"):
|
||||||
|
@ -27,9 +27,8 @@ if os.environ.get("SHOW_ERRORS"):
|
||||||
class test_image_results:
|
class test_image_results:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def upload(a, b):
|
def upload(a, b):
|
||||||
diff = ImageChops.difference(a.convert("RGB"), b.convert("RGB"))
|
a.show()
|
||||||
c = concat_h([a, b, diff])
|
b.show()
|
||||||
c.show()
|
|
||||||
|
|
||||||
elif "GITHUB_ACTIONS" in os.environ:
|
elif "GITHUB_ACTIONS" in os.environ:
|
||||||
HAS_UPLOADER = True
|
HAS_UPLOADER = True
|
||||||
|
@ -53,19 +52,6 @@ else:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def concat_h(images: List[Image.Image]):
|
|
||||||
new_size = images[0].size
|
|
||||||
for image in images[1:]:
|
|
||||||
assert image.height == new_size[1]
|
|
||||||
new_size = (new_size[0] + image.width, new_size[1])
|
|
||||||
dst = Image.new("RGBA", new_size)
|
|
||||||
x_offset = 0
|
|
||||||
for image in images:
|
|
||||||
dst.paste(image, (x_offset, 0))
|
|
||||||
x_offset += image.width
|
|
||||||
return dst
|
|
||||||
|
|
||||||
|
|
||||||
def convert_to_comparable(a, b):
|
def convert_to_comparable(a, b):
|
||||||
new_a, new_b = a, b
|
new_a, new_b = a, b
|
||||||
if a.mode == "P":
|
if a.mode == "P":
|
||||||
|
|
Loading…
Reference in New Issue
Block a user