%global _empty_manifest_terminate_build 0 Name: python-pypixel Version: 1.0.1 Release: 1 Summary: A Python Library for Image Processing License: MIT URL: https://github.com/JiaCheng-Huang/pypixel Source0: https://mirrors.aliyun.com/pypi/web/packages/68/cf/a895c56b99c76457b06570b4447db1853e171290c5b998bfaa9302f8a375/pypixel-1.0.1.tar.gz BuildArch: noarch %description # pypixel This is a Python image process library # Feature - open and save an Image - show an Image - reshape an Image - convert RGB to Gray - convert RGB to Binary # Usage ## Import package ```py from pypixel import Image ``` ## Open an Image ```py img = Image.open("filepath") ``` ## Save an Image ```py img = Image.open("filepath") ... # Do something to img ... img.save("filepath") ``` ## Show an Image ```py img = Image.open("filepath") img.show() ``` ## Reshape an Image ```py img = Image.open("filepath") img.reshape([height,width]) ``` ## Convert to gray ```py img = Image.open("url") img = img.gray() # default : Float Algorithm img = img.gray("F") # Float Algorithm : r*0.3+g*0.59+b*0.11 img = img.gray("G") # Green Only ``` ## Convert to binary ```py img = Image.open("url") img = img.binary() ``` %package -n python3-pypixel Summary: A Python Library for Image Processing Provides: python-pypixel BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-pypixel # pypixel This is a Python image process library # Feature - open and save an Image - show an Image - reshape an Image - convert RGB to Gray - convert RGB to Binary # Usage ## Import package ```py from pypixel import Image ``` ## Open an Image ```py img = Image.open("filepath") ``` ## Save an Image ```py img = Image.open("filepath") ... # Do something to img ... img.save("filepath") ``` ## Show an Image ```py img = Image.open("filepath") img.show() ``` ## Reshape an Image ```py img = Image.open("filepath") img.reshape([height,width]) ``` ## Convert to gray ```py img = Image.open("url") img = img.gray() # default : Float Algorithm img = img.gray("F") # Float Algorithm : r*0.3+g*0.59+b*0.11 img = img.gray("G") # Green Only ``` ## Convert to binary ```py img = Image.open("url") img = img.binary() ``` %package help Summary: Development documents and examples for pypixel Provides: python3-pypixel-doc %description help # pypixel This is a Python image process library # Feature - open and save an Image - show an Image - reshape an Image - convert RGB to Gray - convert RGB to Binary # Usage ## Import package ```py from pypixel import Image ``` ## Open an Image ```py img = Image.open("filepath") ``` ## Save an Image ```py img = Image.open("filepath") ... # Do something to img ... img.save("filepath") ``` ## Show an Image ```py img = Image.open("filepath") img.show() ``` ## Reshape an Image ```py img = Image.open("filepath") img.reshape([height,width]) ``` ## Convert to gray ```py img = Image.open("url") img = img.gray() # default : Float Algorithm img = img.gray("F") # Float Algorithm : r*0.3+g*0.59+b*0.11 img = img.gray("G") # Green Only ``` ## Convert to binary ```py img = Image.open("url") img = img.binary() ``` %prep %autosetup -n pypixel-1.0.1 %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-pypixel -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Thu Jun 08 2023 Python_Bot - 1.0.1-1 - Package Spec generated