mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +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 tempfile
|
||||
from io import BytesIO
|
||||
from typing import List
|
||||
|
||||
import pytest
|
||||
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__)
|
||||
|
||||
|
||||
HAS_UPLOADER = False
|
||||
|
||||
if os.environ.get("SHOW_ERRORS"):
|
||||
|
@ -27,9 +27,8 @@ if os.environ.get("SHOW_ERRORS"):
|
|||
class test_image_results:
|
||||
@staticmethod
|
||||
def upload(a, b):
|
||||
diff = ImageChops.difference(a.convert("RGB"), b.convert("RGB"))
|
||||
c = concat_h([a, b, diff])
|
||||
c.show()
|
||||
a.show()
|
||||
b.show()
|
||||
|
||||
elif "GITHUB_ACTIONS" in os.environ:
|
||||
HAS_UPLOADER = True
|
||||
|
@ -53,19 +52,6 @@ else:
|
|||
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):
|
||||
new_a, new_b = a, b
|
||||
if a.mode == "P":
|
||||
|
|
Loading…
Reference in New Issue
Block a user