allow passing PIL image to Eynollah w/o disk I/O

This commit is contained in:
Konstantin Baierer 2021-04-15 17:25:05 +02:00
parent ba561ec833
commit 4897cefdb7
6 changed files with 53 additions and 48 deletions

View file

@ -1,10 +1,11 @@
import cv2
from pathlib import Path
from qurator.eynollah.utils.pil_cv2 import check_dpi
from tests.base import main
def test_dpi():
fpath = Path(__file__).parent.joinpath('resources', 'kant_aufklaerung_1784_0020.tif')
assert 300 == check_dpi(str(fpath))
fpath = str(Path(__file__).parent.joinpath('resources', 'kant_aufklaerung_1784_0020.tif'))
assert 230 == check_dpi(cv2.imread(fpath))
if __name__ == '__main__':
main(__file__)