summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-10 07:56:34 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-10 07:56:34 +0000
commit351e3d4f9d4e4572ead797f67a9dc1348949874c (patch)
tree46d77aba468e560d7589a687b6cc0d4e0839e7b3
parent37fff5a15cc86c945d998c6ead6c35ab86d49359 (diff)
automatic import of python-ssim-pil
-rw-r--r--.gitignore1
-rw-r--r--python-ssim-pil.spec180
-rw-r--r--sources1
3 files changed, 182 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..871c583 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/SSIM-PIL-1.0.14.tar.gz
diff --git a/python-ssim-pil.spec b/python-ssim-pil.spec
new file mode 100644
index 0000000..3479ab8
--- /dev/null
+++ b/python-ssim-pil.spec
@@ -0,0 +1,180 @@
+%global _empty_manifest_terminate_build 0
+Name: python-SSIM-PIL
+Version: 1.0.14
+Release: 1
+Summary: Comparison of two images using the structural similarity algorithm (SSIM).
+License: MIT License
+URL: https://github.com/ChsHub/SSIM-PIL
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/23/c3/5538bdb2654005bc162d4fdf49c21de11fb03d317077d21c885d950febbc/SSIM-PIL-1.0.14.tar.gz
+BuildArch: noarch
+
+
+%description
+# SSIM-PIL
+Comparison of two images using the structural similarity algorithm (SSIM).
+The resulting value varies between 1.0 for identical images and 0.0 for completely different images.
+It's based on the PIL and also supports GPU acceleration via pyopencl.
+
+## Installation
+`python3 -m pip install SSIM-PIL`
+
+Be sure to install a working version of pyopencl to benefit from faster parallel execution on the GPU. (The code was
+tested with OpenCl version 1.2.)
+
+## Usage Example
+
+```python
+
+from SSIM_PIL import compare_ssim
+from PIL import Image
+
+image1 = Image.open(path)
+image2 = Image.open(path)
+
+# Compare images using OpenCL by default
+value = compare_ssim(image1, image2)
+print(value)
+
+# Compare images using CPU-only version
+value = compare_ssim(image1, image2, GPU=False)
+print(value)
+
+```
+
+## Feedback
+
+For feedback please contact me over github: https://github.com/ChsHub/SSIM-PIL.
+
+
+
+
+%package -n python3-SSIM-PIL
+Summary: Comparison of two images using the structural similarity algorithm (SSIM).
+Provides: python-SSIM-PIL
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-SSIM-PIL
+# SSIM-PIL
+Comparison of two images using the structural similarity algorithm (SSIM).
+The resulting value varies between 1.0 for identical images and 0.0 for completely different images.
+It's based on the PIL and also supports GPU acceleration via pyopencl.
+
+## Installation
+`python3 -m pip install SSIM-PIL`
+
+Be sure to install a working version of pyopencl to benefit from faster parallel execution on the GPU. (The code was
+tested with OpenCl version 1.2.)
+
+## Usage Example
+
+```python
+
+from SSIM_PIL import compare_ssim
+from PIL import Image
+
+image1 = Image.open(path)
+image2 = Image.open(path)
+
+# Compare images using OpenCL by default
+value = compare_ssim(image1, image2)
+print(value)
+
+# Compare images using CPU-only version
+value = compare_ssim(image1, image2, GPU=False)
+print(value)
+
+```
+
+## Feedback
+
+For feedback please contact me over github: https://github.com/ChsHub/SSIM-PIL.
+
+
+
+
+%package help
+Summary: Development documents and examples for SSIM-PIL
+Provides: python3-SSIM-PIL-doc
+%description help
+# SSIM-PIL
+Comparison of two images using the structural similarity algorithm (SSIM).
+The resulting value varies between 1.0 for identical images and 0.0 for completely different images.
+It's based on the PIL and also supports GPU acceleration via pyopencl.
+
+## Installation
+`python3 -m pip install SSIM-PIL`
+
+Be sure to install a working version of pyopencl to benefit from faster parallel execution on the GPU. (The code was
+tested with OpenCl version 1.2.)
+
+## Usage Example
+
+```python
+
+from SSIM_PIL import compare_ssim
+from PIL import Image
+
+image1 = Image.open(path)
+image2 = Image.open(path)
+
+# Compare images using OpenCL by default
+value = compare_ssim(image1, image2)
+print(value)
+
+# Compare images using CPU-only version
+value = compare_ssim(image1, image2, GPU=False)
+print(value)
+
+```
+
+## Feedback
+
+For feedback please contact me over github: https://github.com/ChsHub/SSIM-PIL.
+
+
+
+
+%prep
+%autosetup -n SSIM-PIL-1.0.14
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-SSIM-PIL -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.14-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..e256d61
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+84ce5587ce334c66673aaeecbe343ad5 SSIM-PIL-1.0.14.tar.gz