diff -Nru libpillowfight-0.3.0/debian/changelog libpillowfight-0.3.0/debian/changelog --- libpillowfight-0.3.0/debian/changelog 2022-11-02 10:23:32.000000000 +0000 +++ libpillowfight-0.3.0/debian/changelog 2022-09-18 10:52:14.000000000 +0000 @@ -1,38 +1,14 @@ -libpillowfight (0.3.0-4ubuntu3) lunar; urgency=medium +libpillowfight (0.3.0-5) unstable; urgency=medium - * No-change rebuild with Python 3.11 as supported + * debian/control: dump Build-Depends to 4.6.1 + * debian/copyright: update year + * debian/control: drop python3-nosetest build dependency (Closes: #1018399) + * debian/patches: + + import upstream patch to switch from nose to pytest + + add debian patch to remove nose from setup.py + * debian/watch: drop filenamemangling - -- Graham Inggs Wed, 02 Nov 2022 10:23:32 +0000 - -libpillowfight (0.3.0-4ubuntu2) jammy; urgency=medium - - * No-change rebuild with Python 3.10 only - - -- Graham Inggs Thu, 17 Mar 2022 19:27:03 +0000 - -libpillowfight (0.3.0-4ubuntu1) jammy; urgency=medium - - * Turn off use of LTO on amd64, which results in a misbuild. - - -- Steve Langasek Wed, 17 Nov 2021 21:44:34 +0000 - -libpillowfight (0.3.0-4build3) jammy; urgency=medium - - * No-change rebuild to add python3.10. - - -- Matthias Klose Sat, 16 Oct 2021 06:56:42 +0000 - -libpillowfight (0.3.0-4build2) hirsute; urgency=medium - - * No-change rebuild to drop python3.8 extensions. - - -- Matthias Klose Mon, 07 Dec 2020 18:40:07 +0100 - -libpillowfight (0.3.0-4build1) hirsute; urgency=medium - - * No-change rebuild to build with python3.9 as supported. - - -- Matthias Klose Sat, 24 Oct 2020 10:52:46 +0200 + -- Thomas Perret Sun, 18 Sep 2022 12:52:14 +0200 libpillowfight (0.3.0-4) unstable; urgency=medium diff -Nru libpillowfight-0.3.0/debian/control libpillowfight-0.3.0/debian/control --- libpillowfight-0.3.0/debian/control 2021-11-17 21:44:34.000000000 +0000 +++ libpillowfight-0.3.0/debian/control 2022-09-18 10:52:14.000000000 +0000 @@ -1,10 +1,9 @@ Source: libpillowfight Section: python Priority: optional -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Thomas Perret -Build-Depends: debhelper-compat (= 13), cmake, dh-python, libpython3-all-dev, libpython3-all-dbg, python3-all-dev:any, python3-all-dbg:any, python3-setuptools, python3-nose -Standards-Version: 4.5.0 +Maintainer: Thomas Perret +Build-Depends: debhelper-compat (= 13), cmake, dh-python, libpython3-all-dev, libpython3-all-dbg, python3-all-dev:any, python3-all-dbg:any, python3-setuptools, python3-pytest +Standards-Version: 4.6.1 Homepage: https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight Vcs-Browser: https://salsa.debian.org/openpaperwork-team/libpillowfight Vcs-Git: https://salsa.debian.org/openpaperwork-team/libpillowfight.git diff -Nru libpillowfight-0.3.0/debian/copyright libpillowfight-0.3.0/debian/copyright --- libpillowfight-0.3.0/debian/copyright 2020-08-18 18:44:29.000000000 +0000 +++ libpillowfight-0.3.0/debian/copyright 2022-09-18 10:52:14.000000000 +0000 @@ -30,7 +30,7 @@ License: GPL-2 Files: debian/* -Copyright: 2018, Thomas Perret +Copyright: 2018-2022, Thomas Perret License: GPL-2+ License: GPL-2 diff -Nru libpillowfight-0.3.0/debian/patches/0001-Move-unittests-stack-from-nose-to-pytest.patch libpillowfight-0.3.0/debian/patches/0001-Move-unittests-stack-from-nose-to-pytest.patch --- libpillowfight-0.3.0/debian/patches/0001-Move-unittests-stack-from-nose-to-pytest.patch 1970-01-01 00:00:00.000000000 +0000 +++ libpillowfight-0.3.0/debian/patches/0001-Move-unittests-stack-from-nose-to-pytest.patch 2022-09-18 10:52:14.000000000 +0000 @@ -0,0 +1,58 @@ +From: Thomas Perret +Date: Fri, 21 Aug 2020 17:30:19 +0200 +Subject: Move unittests stack from nose to pytest +Origin: https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight/-/commit/f8a31e695e32d6092e3b2f036188effb5ad7b0b2 +Forwarded: yes + +--- + .gitignore | 1 + + pytest.ini | 3 +++ + tox.ini | 13 +++++++++++-- + 3 files changed, 15 insertions(+), 2 deletions(-) + create mode 100644 pytest.ini + +diff --git a/.gitignore b/.gitignore +index 0a399c4..be2f80a 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -49,6 +49,7 @@ nosetests.xml + coverage.xml + *,cover + .hypothesis/ ++.pytest_cache/ + + # Translations + *.mo +diff --git a/pytest.ini b/pytest.ini +new file mode 100644 +index 0000000..294ad40 +--- /dev/null ++++ b/pytest.ini +@@ -0,0 +1,3 @@ ++[pytest] ++addopts = -v --cov=pillowfight --cov-report=term-missing --cov-branch ++python_files = tests/tests_*.py +diff --git a/tox.ini b/tox.ini +index a178b92..6e25470 100644 +--- a/tox.ini ++++ b/tox.ini +@@ -2,8 +2,17 @@ + envlist=py3 + + [testenv] +-deps=nose +-commands=./setup.py nosetests ++deps= ++ pytest ++ pytest-cov ++# The two following lines have the same meaning but whitelist_externals option ++# is deprecated for versions >=3.18 and allowlist_externals is only recognized ++# for versions >=3.18 ++whitelist_externals=make ++allowlist_externals=make ++commands= ++ make version ++ pytest + + [flake8] + exclude = diff -Nru libpillowfight-0.3.0/debian/patches/0002-Move-from-nose-to-pytest.patch libpillowfight-0.3.0/debian/patches/0002-Move-from-nose-to-pytest.patch --- libpillowfight-0.3.0/debian/patches/0002-Move-from-nose-to-pytest.patch 1970-01-01 00:00:00.000000000 +0000 +++ libpillowfight-0.3.0/debian/patches/0002-Move-from-nose-to-pytest.patch 2022-09-18 10:52:14.000000000 +0000 @@ -0,0 +1,20 @@ +From: Thomas Perret +Date: Fri, 9 Sep 2022 00:33:40 +0200 +Subject: Move from nose to pytest +Forwarded: no + +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index b0f2750..e010f86 100755 +--- a/setup.py ++++ b/setup.py +@@ -90,5 +90,5 @@ setup( + install_requires=[ + "Pillow", + ], +- setup_requires=['nose>=1.0'], ++ setup_requires=['pytest'], + ) diff -Nru libpillowfight-0.3.0/debian/patches/series libpillowfight-0.3.0/debian/patches/series --- libpillowfight-0.3.0/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ libpillowfight-0.3.0/debian/patches/series 2022-09-18 10:52:14.000000000 +0000 @@ -0,0 +1,2 @@ +0001-Move-unittests-stack-from-nose-to-pytest.patch +0002-Move-from-nose-to-pytest.patch diff -Nru libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.8/dist-packages/pillowfight/__init__.py libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.8/dist-packages/pillowfight/__init__.py --- libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.8/dist-packages/pillowfight/__init__.py 2019-10-09 10:34:07.000000000 +0000 +++ libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.8/dist-packages/pillowfight/__init__.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,292 +0,0 @@ -import logging -import multiprocessing -import time - -import PIL.Image - -from . import _clib - - -logger = logging.getLogger(__name__) - - -def ace(img_in, slope=10, limit=1000, samples=100, seed=None, nb_threads=None): - """ - Automatic Color Equalization - """ - if seed is None: - seed = int(time.time()) - if img_in.mode != "RGBA": - img_in = img_in.convert("RGBA") # Add alpha to align on 32bits - img_out = bytes(img_in.size[0] * img_in.size[1] * 4 * [0]) - _clib.ace( - img_in.size[0], - img_in.size[1], - img_in.tobytes(), - slope, - limit, - samples, - nb_threads if nb_threads is not None else multiprocessing.cpu_count(), - seed, - img_out - ) - # alpha channel is lost by algorithm anyway --> RGBA => RGB - return PIL.Image.frombytes( - mode="RGBA", - size=(img_in.size[0], img_in.size[1]), - data=img_out - ).convert("RGB") - - -def compare(img_in, img_in2, tolerance=10): - """ - Compare two images - """ - if img_in.mode != "RGBA": - img_in = img_in.convert("RGBA") # Add alpha to align on 32bits - if img_in2.mode != "RGBA": - img_in2 = img_in2.convert("RGBA") # Add alpha to align on 32bits - - # img_out must have a size that is the smallest common denominator - min_x = min(img_in.size[0], img_in2.size[0]) - min_y = min(img_in.size[1], img_in2.size[1]) - img_out = bytes(min_x * min_y * 4 * [0]) - out = _clib.compare( - img_in.size[0], - img_in.size[1], - img_in2.size[0], - img_in2.size[1], - img_in.tobytes(), - img_in2.tobytes(), - img_out, - tolerance - ) - # alpha channel is lost by algorithm anyway --> RGBA => RGB - return (out, PIL.Image.frombytes( - mode="RGBA", - size=(min_x, min_y), - data=img_out - ).convert("RGB")) - - -def unpaper_blackfilter(img_in): - has_alpha = "A" in img_in.mode - if img_in.mode != "RGBA": - img_in = img_in.convert("RGBA") # Add alpha to align on 32bits - img_out = bytes(img_in.size[0] * img_in.size[1] * 4 * [0]) - _clib.unpaper_blackfilter( - img_in.size[0], - img_in.size[1], - img_in.tobytes(), - img_out - ) - out = PIL.Image.frombytes( - mode="RGBA", - size=(img_in.size[0], img_in.size[1]), - data=img_out - ) - if not has_alpha: - out = out.convert("RGB") - return out - - -def unpaper_blurfilter(img_in): - has_alpha = "A" in img_in.mode - if img_in.mode != "RGBA": - img_in = img_in.convert("RGBA") # Add alpha to align on 32bits - img_out = bytes(img_in.size[0] * img_in.size[1] * 4 * [0]) - _clib.unpaper_blurfilter( - img_in.size[0], - img_in.size[1], - img_in.tobytes(), - img_out - ) - out = PIL.Image.frombytes( - mode="RGBA", - size=(img_in.size[0], img_in.size[1]), - data=img_out - ) - if not has_alpha: - out = out.convert("RGB") - return out - - -def unpaper_border(img_in): - has_alpha = "A" in img_in.mode - if img_in.mode != "RGBA": - img_in = img_in.convert("RGBA") # Add alpha to align on 32bits - img_out = bytes(img_in.size[0] * img_in.size[1] * 4 * [0]) - _clib.unpaper_border( - img_in.size[0], - img_in.size[1], - img_in.tobytes(), - img_out - ) - out = PIL.Image.frombytes( - mode="RGBA", - size=(img_in.size[0], img_in.size[1]), - data=img_out - ) - if not has_alpha: - out = out.convert("RGB") - return out - - -def canny(img_in): - if img_in.mode != "RGBA": - img_in = img_in.convert("RGBA") # Add alpha to align on 32bits - img_out = bytes(img_in.size[0] * img_in.size[1] * 4 * [0]) - _clib.canny( - img_in.size[0], - img_in.size[1], - img_in.tobytes(), - img_out - ) - # alpha channel is lost by algorithm anyway --> RGBA => RGB - return PIL.Image.frombytes( - mode="RGBA", - size=(img_in.size[0], img_in.size[1]), - data=img_out - ).convert("RGB") - - -def gaussian(img_in, sigma=2.0, nb_stddev=5): - if img_in.mode != "RGBA": - img_in = img_in.convert("RGBA") # Add alpha to align on 32bits - img_out = bytes(img_in.size[0] * img_in.size[1] * 4 * [0]) - _clib.gaussian( - img_in.size[0], - img_in.size[1], - img_in.tobytes(), - img_out, - sigma, - nb_stddev - ) - # alpha channel is lost by algorithm anyway --> RGBA => RGB - return PIL.Image.frombytes( - mode="RGBA", - size=(img_in.size[0], img_in.size[1]), - data=img_out - ).convert("RGB") - - -def unpaper_grayfilter(img_in): - has_alpha = "A" in img_in.mode - if img_in.mode != "RGBA": - img_in = img_in.convert("RGBA") # Add alpha to align on 32bits - img_out = bytes(img_in.size[0] * img_in.size[1] * 4 * [0]) - _clib.unpaper_grayfilter( - img_in.size[0], - img_in.size[1], - img_in.tobytes(), - img_out - ) - out = PIL.Image.frombytes( - mode="RGBA", - size=(img_in.size[0], img_in.size[1]), - data=img_out - ) - if not has_alpha: - out = out.convert("RGB") - return out - - -def unpaper_masks(img_in): - has_alpha = "A" in img_in.mode - if img_in.mode != "RGBA": - img_in = img_in.convert("RGBA") # Add alpha to align on 32bits - img_out = bytes(img_in.size[0] * img_in.size[1] * 4 * [0]) - _clib.unpaper_masks( - img_in.size[0], - img_in.size[1], - img_in.tobytes(), - img_out - ) - out = PIL.Image.frombytes( - mode="RGBA", - size=(img_in.size[0], img_in.size[1]), - data=img_out - ) - if not has_alpha: - out = out.convert("RGB") - return out - - -def unpaper_noisefilter(img_in): - has_alpha = "A" in img_in.mode - if img_in.mode != "RGBA": - img_in = img_in.convert("RGBA") # Add alpha to align on 32bits - img_out = bytes(img_in.size[0] * img_in.size[1] * 4 * [0]) - _clib.unpaper_noisefilter( - img_in.size[0], - img_in.size[1], - img_in.tobytes(), - img_out - ) - out = PIL.Image.frombytes( - mode="RGBA", - size=(img_in.size[0], img_in.size[1]), - data=img_out - ) - if not has_alpha: - out = out.convert("RGB") - return out - - -def sobel(img_in): - if img_in.mode != "RGBA": - img_in = img_in.convert("RGBA") # Add alpha to align on 32bits - img_out = bytes(img_in.size[0] * img_in.size[1] * 4 * [0]) - _clib.sobel( - img_in.size[0], - img_in.size[1], - img_in.tobytes(), - img_out - ) - # alpha channel is lost by algorithm anyway --> RGBA => RGB - return PIL.Image.frombytes( - mode="RGBA", - size=(img_in.size[0], img_in.size[1]), - data=img_out - ).convert("RGB") - - -SWT_OUTPUT_BW_TEXT = 0 -SWT_OUTPUT_GRAYSCALE_TEXT = 1 -SWT_OUTPUT_ORIGINAL_BOXES = 2 - - -def swt(img_in, output_type=SWT_OUTPUT_BW_TEXT): - if img_in.mode != "RGBA": - img_in = img_in.convert("RGBA") # Add alpha to align on 32bits - img_out = bytes(img_in.size[0] * img_in.size[1] * 4 * [0]) - _clib.swt( - img_in.size[0], - img_in.size[1], - img_in.tobytes(), - img_out, - output_type - ) - # alpha channel is lost by algorithm anyway --> RGBA => RGB - return PIL.Image.frombytes( - mode="RGBA", - size=(img_in.size[0], img_in.size[1]), - data=img_out - ).convert("RGB") - - -def find_scan_borders(img_in): - if img_in.mode != "RGBA": - img_in = img_in.convert("RGBA") # Add alpha to align on 32bits - return _clib.find_scan_borders( - img_in.size[0], - img_in.size[1], - img_in.tobytes() - ) - - -def get_version(): - return _clib.get_version() - - -__version__ = get_version() diff -Nru libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.8/dist-packages/pypillowfight-0.3.0.egg-info/dependency_links.txt libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.8/dist-packages/pypillowfight-0.3.0.egg-info/dependency_links.txt --- libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.8/dist-packages/pypillowfight-0.3.0.egg-info/dependency_links.txt 2021-11-17 17:03:19.000000000 +0000 +++ libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.8/dist-packages/pypillowfight-0.3.0.egg-info/dependency_links.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ - diff -Nru libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.8/dist-packages/pypillowfight-0.3.0.egg-info/PKG-INFO libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.8/dist-packages/pypillowfight-0.3.0.egg-info/PKG-INFO --- libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.8/dist-packages/pypillowfight-0.3.0.egg-info/PKG-INFO 2021-11-17 17:03:19.000000000 +0000 +++ libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.8/dist-packages/pypillowfight-0.3.0.egg-info/PKG-INFO 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -Metadata-Version: 1.1 -Name: pypillowfight -Version: 0.3.0 -Summary: Library containing various image processing algorithms -Home-page: https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight#readme -Author: Jerome Flesch -Author-email: jflesch@openpaper.work -License: GPLv2 -Download-URL: https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight/archive/0.3.0.zip -Description: Library containing various image processing algorithms: Automatic Color Equalization, Unpaper's algorithms, Stroke Width Transformation, etc -Keywords: image processing algorithm pillow pil -Platform: UNKNOWN -Classifier: Intended Audience :: Developers -Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2) -Classifier: Operating System :: POSIX :: Linux -Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.5 -Classifier: Topic :: Multimedia :: Graphics :: Graphics Conversion diff -Nru libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.8/dist-packages/pypillowfight-0.3.0.egg-info/requires.txt libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.8/dist-packages/pypillowfight-0.3.0.egg-info/requires.txt --- libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.8/dist-packages/pypillowfight-0.3.0.egg-info/requires.txt 2021-11-17 17:03:19.000000000 +0000 +++ libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.8/dist-packages/pypillowfight-0.3.0.egg-info/requires.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Pillow diff -Nru libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.8/dist-packages/pypillowfight-0.3.0.egg-info/top_level.txt libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.8/dist-packages/pypillowfight-0.3.0.egg-info/top_level.txt --- libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.8/dist-packages/pypillowfight-0.3.0.egg-info/top_level.txt 2021-11-17 17:03:19.000000000 +0000 +++ libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.8/dist-packages/pypillowfight-0.3.0.egg-info/top_level.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -pillowfight diff -Nru libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.9/dist-packages/pillowfight/__init__.py libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.9/dist-packages/pillowfight/__init__.py --- libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.9/dist-packages/pillowfight/__init__.py 2019-10-09 10:34:07.000000000 +0000 +++ libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.9/dist-packages/pillowfight/__init__.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,292 +0,0 @@ -import logging -import multiprocessing -import time - -import PIL.Image - -from . import _clib - - -logger = logging.getLogger(__name__) - - -def ace(img_in, slope=10, limit=1000, samples=100, seed=None, nb_threads=None): - """ - Automatic Color Equalization - """ - if seed is None: - seed = int(time.time()) - if img_in.mode != "RGBA": - img_in = img_in.convert("RGBA") # Add alpha to align on 32bits - img_out = bytes(img_in.size[0] * img_in.size[1] * 4 * [0]) - _clib.ace( - img_in.size[0], - img_in.size[1], - img_in.tobytes(), - slope, - limit, - samples, - nb_threads if nb_threads is not None else multiprocessing.cpu_count(), - seed, - img_out - ) - # alpha channel is lost by algorithm anyway --> RGBA => RGB - return PIL.Image.frombytes( - mode="RGBA", - size=(img_in.size[0], img_in.size[1]), - data=img_out - ).convert("RGB") - - -def compare(img_in, img_in2, tolerance=10): - """ - Compare two images - """ - if img_in.mode != "RGBA": - img_in = img_in.convert("RGBA") # Add alpha to align on 32bits - if img_in2.mode != "RGBA": - img_in2 = img_in2.convert("RGBA") # Add alpha to align on 32bits - - # img_out must have a size that is the smallest common denominator - min_x = min(img_in.size[0], img_in2.size[0]) - min_y = min(img_in.size[1], img_in2.size[1]) - img_out = bytes(min_x * min_y * 4 * [0]) - out = _clib.compare( - img_in.size[0], - img_in.size[1], - img_in2.size[0], - img_in2.size[1], - img_in.tobytes(), - img_in2.tobytes(), - img_out, - tolerance - ) - # alpha channel is lost by algorithm anyway --> RGBA => RGB - return (out, PIL.Image.frombytes( - mode="RGBA", - size=(min_x, min_y), - data=img_out - ).convert("RGB")) - - -def unpaper_blackfilter(img_in): - has_alpha = "A" in img_in.mode - if img_in.mode != "RGBA": - img_in = img_in.convert("RGBA") # Add alpha to align on 32bits - img_out = bytes(img_in.size[0] * img_in.size[1] * 4 * [0]) - _clib.unpaper_blackfilter( - img_in.size[0], - img_in.size[1], - img_in.tobytes(), - img_out - ) - out = PIL.Image.frombytes( - mode="RGBA", - size=(img_in.size[0], img_in.size[1]), - data=img_out - ) - if not has_alpha: - out = out.convert("RGB") - return out - - -def unpaper_blurfilter(img_in): - has_alpha = "A" in img_in.mode - if img_in.mode != "RGBA": - img_in = img_in.convert("RGBA") # Add alpha to align on 32bits - img_out = bytes(img_in.size[0] * img_in.size[1] * 4 * [0]) - _clib.unpaper_blurfilter( - img_in.size[0], - img_in.size[1], - img_in.tobytes(), - img_out - ) - out = PIL.Image.frombytes( - mode="RGBA", - size=(img_in.size[0], img_in.size[1]), - data=img_out - ) - if not has_alpha: - out = out.convert("RGB") - return out - - -def unpaper_border(img_in): - has_alpha = "A" in img_in.mode - if img_in.mode != "RGBA": - img_in = img_in.convert("RGBA") # Add alpha to align on 32bits - img_out = bytes(img_in.size[0] * img_in.size[1] * 4 * [0]) - _clib.unpaper_border( - img_in.size[0], - img_in.size[1], - img_in.tobytes(), - img_out - ) - out = PIL.Image.frombytes( - mode="RGBA", - size=(img_in.size[0], img_in.size[1]), - data=img_out - ) - if not has_alpha: - out = out.convert("RGB") - return out - - -def canny(img_in): - if img_in.mode != "RGBA": - img_in = img_in.convert("RGBA") # Add alpha to align on 32bits - img_out = bytes(img_in.size[0] * img_in.size[1] * 4 * [0]) - _clib.canny( - img_in.size[0], - img_in.size[1], - img_in.tobytes(), - img_out - ) - # alpha channel is lost by algorithm anyway --> RGBA => RGB - return PIL.Image.frombytes( - mode="RGBA", - size=(img_in.size[0], img_in.size[1]), - data=img_out - ).convert("RGB") - - -def gaussian(img_in, sigma=2.0, nb_stddev=5): - if img_in.mode != "RGBA": - img_in = img_in.convert("RGBA") # Add alpha to align on 32bits - img_out = bytes(img_in.size[0] * img_in.size[1] * 4 * [0]) - _clib.gaussian( - img_in.size[0], - img_in.size[1], - img_in.tobytes(), - img_out, - sigma, - nb_stddev - ) - # alpha channel is lost by algorithm anyway --> RGBA => RGB - return PIL.Image.frombytes( - mode="RGBA", - size=(img_in.size[0], img_in.size[1]), - data=img_out - ).convert("RGB") - - -def unpaper_grayfilter(img_in): - has_alpha = "A" in img_in.mode - if img_in.mode != "RGBA": - img_in = img_in.convert("RGBA") # Add alpha to align on 32bits - img_out = bytes(img_in.size[0] * img_in.size[1] * 4 * [0]) - _clib.unpaper_grayfilter( - img_in.size[0], - img_in.size[1], - img_in.tobytes(), - img_out - ) - out = PIL.Image.frombytes( - mode="RGBA", - size=(img_in.size[0], img_in.size[1]), - data=img_out - ) - if not has_alpha: - out = out.convert("RGB") - return out - - -def unpaper_masks(img_in): - has_alpha = "A" in img_in.mode - if img_in.mode != "RGBA": - img_in = img_in.convert("RGBA") # Add alpha to align on 32bits - img_out = bytes(img_in.size[0] * img_in.size[1] * 4 * [0]) - _clib.unpaper_masks( - img_in.size[0], - img_in.size[1], - img_in.tobytes(), - img_out - ) - out = PIL.Image.frombytes( - mode="RGBA", - size=(img_in.size[0], img_in.size[1]), - data=img_out - ) - if not has_alpha: - out = out.convert("RGB") - return out - - -def unpaper_noisefilter(img_in): - has_alpha = "A" in img_in.mode - if img_in.mode != "RGBA": - img_in = img_in.convert("RGBA") # Add alpha to align on 32bits - img_out = bytes(img_in.size[0] * img_in.size[1] * 4 * [0]) - _clib.unpaper_noisefilter( - img_in.size[0], - img_in.size[1], - img_in.tobytes(), - img_out - ) - out = PIL.Image.frombytes( - mode="RGBA", - size=(img_in.size[0], img_in.size[1]), - data=img_out - ) - if not has_alpha: - out = out.convert("RGB") - return out - - -def sobel(img_in): - if img_in.mode != "RGBA": - img_in = img_in.convert("RGBA") # Add alpha to align on 32bits - img_out = bytes(img_in.size[0] * img_in.size[1] * 4 * [0]) - _clib.sobel( - img_in.size[0], - img_in.size[1], - img_in.tobytes(), - img_out - ) - # alpha channel is lost by algorithm anyway --> RGBA => RGB - return PIL.Image.frombytes( - mode="RGBA", - size=(img_in.size[0], img_in.size[1]), - data=img_out - ).convert("RGB") - - -SWT_OUTPUT_BW_TEXT = 0 -SWT_OUTPUT_GRAYSCALE_TEXT = 1 -SWT_OUTPUT_ORIGINAL_BOXES = 2 - - -def swt(img_in, output_type=SWT_OUTPUT_BW_TEXT): - if img_in.mode != "RGBA": - img_in = img_in.convert("RGBA") # Add alpha to align on 32bits - img_out = bytes(img_in.size[0] * img_in.size[1] * 4 * [0]) - _clib.swt( - img_in.size[0], - img_in.size[1], - img_in.tobytes(), - img_out, - output_type - ) - # alpha channel is lost by algorithm anyway --> RGBA => RGB - return PIL.Image.frombytes( - mode="RGBA", - size=(img_in.size[0], img_in.size[1]), - data=img_out - ).convert("RGB") - - -def find_scan_borders(img_in): - if img_in.mode != "RGBA": - img_in = img_in.convert("RGBA") # Add alpha to align on 32bits - return _clib.find_scan_borders( - img_in.size[0], - img_in.size[1], - img_in.tobytes() - ) - - -def get_version(): - return _clib.get_version() - - -__version__ = get_version() diff -Nru libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.9/dist-packages/pypillowfight-0.3.0.egg-info/dependency_links.txt libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.9/dist-packages/pypillowfight-0.3.0.egg-info/dependency_links.txt --- libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.9/dist-packages/pypillowfight-0.3.0.egg-info/dependency_links.txt 2021-11-17 21:37:52.000000000 +0000 +++ libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.9/dist-packages/pypillowfight-0.3.0.egg-info/dependency_links.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ - diff -Nru libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.9/dist-packages/pypillowfight-0.3.0.egg-info/PKG-INFO libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.9/dist-packages/pypillowfight-0.3.0.egg-info/PKG-INFO --- libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.9/dist-packages/pypillowfight-0.3.0.egg-info/PKG-INFO 2021-11-17 21:37:52.000000000 +0000 +++ libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.9/dist-packages/pypillowfight-0.3.0.egg-info/PKG-INFO 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -Metadata-Version: 1.1 -Name: pypillowfight -Version: 0.3.0 -Summary: Library containing various image processing algorithms -Home-page: https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight#readme -Author: Jerome Flesch -Author-email: jflesch@openpaper.work -License: GPLv2 -Download-URL: https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight/archive/0.3.0.zip -Description: Library containing various image processing algorithms: Automatic Color Equalization, Unpaper's algorithms, Stroke Width Transformation, etc -Keywords: image processing algorithm pillow pil -Platform: UNKNOWN -Classifier: Intended Audience :: Developers -Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2) -Classifier: Operating System :: POSIX :: Linux -Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.5 -Classifier: Topic :: Multimedia :: Graphics :: Graphics Conversion diff -Nru libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.9/dist-packages/pypillowfight-0.3.0.egg-info/requires.txt libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.9/dist-packages/pypillowfight-0.3.0.egg-info/requires.txt --- libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.9/dist-packages/pypillowfight-0.3.0.egg-info/requires.txt 2021-11-17 21:37:52.000000000 +0000 +++ libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.9/dist-packages/pypillowfight-0.3.0.egg-info/requires.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Pillow diff -Nru libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.9/dist-packages/pypillowfight-0.3.0.egg-info/top_level.txt libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.9/dist-packages/pypillowfight-0.3.0.egg-info/top_level.txt --- libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.9/dist-packages/pypillowfight-0.3.0.egg-info/top_level.txt 2021-11-17 21:37:52.000000000 +0000 +++ libpillowfight-0.3.0/debian/python3-pypillowfight-dbg/usr/lib/python3.9/dist-packages/pypillowfight-0.3.0.egg-info/top_level.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -pillowfight diff -Nru libpillowfight-0.3.0/debian/rules libpillowfight-0.3.0/debian/rules --- libpillowfight-0.3.0/debian/rules 2021-11-17 21:44:34.000000000 +0000 +++ libpillowfight-0.3.0/debian/rules 2022-09-18 10:52:14.000000000 +0000 @@ -11,12 +11,7 @@ src/pillowfight/_version.h: debian/_version.h.in sed 's,@DEB_VERSION_UPSTREAM@,$(DEB_VERSION_UPSTREAM),g' $< > $@ -DEB_BUILD_MAINT_OPTIONS = hardening=+all -ifeq ($(DEB_HOST_ARCH),amd64) - DEB_BUILD_MAINT_OPTIONS += optimize=-lto -endif -export DEB_BUILD_MAINT_OPTIONS - +export DEB_BUILD_MAINT_OPTIONS = hardening=+all %: dh $@ --with python3 diff -Nru libpillowfight-0.3.0/debian/watch libpillowfight-0.3.0/debian/watch --- libpillowfight-0.3.0/debian/watch 2020-08-18 18:44:29.000000000 +0000 +++ libpillowfight-0.3.0/debian/watch 2022-09-18 10:52:14.000000000 +0000 @@ -1,3 +1,2 @@ version=4 -opts=filenamemangle=s/.*\/archive\/(\d\S+)\/libpillowfight.*\.tar\.gz/libpillowfight-$1\.tar\.gz/g \ - https://gitlab.gnome.org/World/OpenPaperWork/libpillowfight/tags?sort=updated_desc .*/archive/(\d\S+)/.*\.tar\.gz.* +https://gitlab.gnome.org/World/OpenPaperWork/libpillowfight/tags?sort=updated_desc .*/archive/(\d\S+)/.*\.tar\.gz.*