diff options
author | CoprDistGit <copr-devel@lists.fedorahosted.org> | 2023-03-09 02:18:02 +0000 |
---|---|---|
committer | CoprDistGit <copr-devel@lists.fedorahosted.org> | 2023-03-09 02:18:02 +0000 |
commit | b9df5f2433c613d75eaf68cd7e3dc06aefe96a28 (patch) | |
tree | 26935884d4ab1e9a24494d705eeee7879bc44869 | |
parent | 45104b3f83a230fd929587cb3767349f2ba136c6 (diff) |
automatic import of python-colorspacious
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-colorspacious.spec | 220 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 222 insertions, 0 deletions
@@ -0,0 +1 @@ +/colorspacious-1.1.2.tar.gz diff --git a/python-colorspacious.spec b/python-colorspacious.spec new file mode 100644 index 0000000..a59ec4a --- /dev/null +++ b/python-colorspacious.spec @@ -0,0 +1,220 @@ +%global _empty_manifest_terminate_build 0 +Name: python-colorspacious +Version: 1.1.2 +Release: 1 +Summary: A powerful, accurate, and easy-to-use Python library for doing colorspace conversions +License: MIT +URL: https://github.com/njsmith/colorspacious +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/75/e4/aa41ae14c5c061205715006c8834496d86ec7500f1edda5981f0f0190cc6/colorspacious-1.1.2.tar.gz +BuildArch: noarch + +Requires: python3-numpy + +%description +Colorspacious is a powerful, accurate, and easy-to-use library for +performing colorspace conversions. +In addition to the most common standard colorspaces (sRGB, XYZ, xyY, +CIELab, CIELCh), we also include: color vision deficiency ("color +blindness") simulations using the approach of Machado et al (2009); a +complete implementation of `CIECAM02 +<https://en.wikipedia.org/wiki/CIECAM02>`_; and the perceptually +uniform CAM02-UCS / CAM02-LCD / CAM02-SCD spaces proposed by Luo et al +(2006). +To get started, simply write:: + from colorspacious import cspace_convert + Jp, ap, bp = cspace_convert([64, 128, 255], "sRGB255", "CAM02-UCS") +This converts an sRGB value (represented as integers between 0-255) to +CAM02-UCS `J'a'b'` coordinates (assuming standard sRGB viewing +conditions by default). This requires passing through 4 intermediate +colorspaces; ``cspace_convert`` automatically finds the optimal route +and applies all conversions in sequence: +This function also of course accepts arbitrary NumPy arrays, so +converting a whole image is just as easy as converting a single value. +Documentation: + http://colorspacious.readthedocs.org/ +Installation: + ``pip install colorspacious`` +Downloads: + https://pypi.python.org/pypi/colorspacious/ +Code and bug tracker: + https://github.com/njsmith/colorspacious +Contact: + Nathaniel J. Smith <njs@pobox.com> +Dependencies: + * Python 2.6+, or 3.3+ + * NumPy +Developer dependencies (only needed for hacking on source): + * nose: needed to run tests +License: + MIT, see LICENSE.txt for details. +References for algorithms we implement: + * Luo, M. R., Cui, G., & Li, C. (2006). Uniform colour spaces based on + CIECAM02 colour appearance model. Color Research & Application, 31(4), + 320–330. doi:10.1002/col.20227 + * Machado, G. M., Oliveira, M. M., & Fernandes, L. A. (2009). A + physiologically-based model for simulation of color vision + deficiency. Visualization and Computer Graphics, IEEE Transactions on, + 15(6), 1291–1298. http://www.inf.ufrgs.br/~oliveira/pubs_files/CVD_Simulation/CVD_Simulation.html +Other Python packages with similar functionality that you might want +to check out as well or instead: +* ``colour``: http://colour-science.org/ +* ``colormath``: http://python-colormath.readthedocs.org/ +* ``ciecam02``: https://pypi.python.org/pypi/ciecam02/ +* ``ColorPy``: http://markkness.net/colorpy/ColorPy.html + +%package -n python3-colorspacious +Summary: A powerful, accurate, and easy-to-use Python library for doing colorspace conversions +Provides: python-colorspacious +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-colorspacious +Colorspacious is a powerful, accurate, and easy-to-use library for +performing colorspace conversions. +In addition to the most common standard colorspaces (sRGB, XYZ, xyY, +CIELab, CIELCh), we also include: color vision deficiency ("color +blindness") simulations using the approach of Machado et al (2009); a +complete implementation of `CIECAM02 +<https://en.wikipedia.org/wiki/CIECAM02>`_; and the perceptually +uniform CAM02-UCS / CAM02-LCD / CAM02-SCD spaces proposed by Luo et al +(2006). +To get started, simply write:: + from colorspacious import cspace_convert + Jp, ap, bp = cspace_convert([64, 128, 255], "sRGB255", "CAM02-UCS") +This converts an sRGB value (represented as integers between 0-255) to +CAM02-UCS `J'a'b'` coordinates (assuming standard sRGB viewing +conditions by default). This requires passing through 4 intermediate +colorspaces; ``cspace_convert`` automatically finds the optimal route +and applies all conversions in sequence: +This function also of course accepts arbitrary NumPy arrays, so +converting a whole image is just as easy as converting a single value. +Documentation: + http://colorspacious.readthedocs.org/ +Installation: + ``pip install colorspacious`` +Downloads: + https://pypi.python.org/pypi/colorspacious/ +Code and bug tracker: + https://github.com/njsmith/colorspacious +Contact: + Nathaniel J. Smith <njs@pobox.com> +Dependencies: + * Python 2.6+, or 3.3+ + * NumPy +Developer dependencies (only needed for hacking on source): + * nose: needed to run tests +License: + MIT, see LICENSE.txt for details. +References for algorithms we implement: + * Luo, M. R., Cui, G., & Li, C. (2006). Uniform colour spaces based on + CIECAM02 colour appearance model. Color Research & Application, 31(4), + 320–330. doi:10.1002/col.20227 + * Machado, G. M., Oliveira, M. M., & Fernandes, L. A. (2009). A + physiologically-based model for simulation of color vision + deficiency. Visualization and Computer Graphics, IEEE Transactions on, + 15(6), 1291–1298. http://www.inf.ufrgs.br/~oliveira/pubs_files/CVD_Simulation/CVD_Simulation.html +Other Python packages with similar functionality that you might want +to check out as well or instead: +* ``colour``: http://colour-science.org/ +* ``colormath``: http://python-colormath.readthedocs.org/ +* ``ciecam02``: https://pypi.python.org/pypi/ciecam02/ +* ``ColorPy``: http://markkness.net/colorpy/ColorPy.html + +%package help +Summary: Development documents and examples for colorspacious +Provides: python3-colorspacious-doc +%description help +Colorspacious is a powerful, accurate, and easy-to-use library for +performing colorspace conversions. +In addition to the most common standard colorspaces (sRGB, XYZ, xyY, +CIELab, CIELCh), we also include: color vision deficiency ("color +blindness") simulations using the approach of Machado et al (2009); a +complete implementation of `CIECAM02 +<https://en.wikipedia.org/wiki/CIECAM02>`_; and the perceptually +uniform CAM02-UCS / CAM02-LCD / CAM02-SCD spaces proposed by Luo et al +(2006). +To get started, simply write:: + from colorspacious import cspace_convert + Jp, ap, bp = cspace_convert([64, 128, 255], "sRGB255", "CAM02-UCS") +This converts an sRGB value (represented as integers between 0-255) to +CAM02-UCS `J'a'b'` coordinates (assuming standard sRGB viewing +conditions by default). This requires passing through 4 intermediate +colorspaces; ``cspace_convert`` automatically finds the optimal route +and applies all conversions in sequence: +This function also of course accepts arbitrary NumPy arrays, so +converting a whole image is just as easy as converting a single value. +Documentation: + http://colorspacious.readthedocs.org/ +Installation: + ``pip install colorspacious`` +Downloads: + https://pypi.python.org/pypi/colorspacious/ +Code and bug tracker: + https://github.com/njsmith/colorspacious +Contact: + Nathaniel J. Smith <njs@pobox.com> +Dependencies: + * Python 2.6+, or 3.3+ + * NumPy +Developer dependencies (only needed for hacking on source): + * nose: needed to run tests +License: + MIT, see LICENSE.txt for details. +References for algorithms we implement: + * Luo, M. R., Cui, G., & Li, C. (2006). Uniform colour spaces based on + CIECAM02 colour appearance model. Color Research & Application, 31(4), + 320–330. doi:10.1002/col.20227 + * Machado, G. M., Oliveira, M. M., & Fernandes, L. A. (2009). A + physiologically-based model for simulation of color vision + deficiency. Visualization and Computer Graphics, IEEE Transactions on, + 15(6), 1291–1298. http://www.inf.ufrgs.br/~oliveira/pubs_files/CVD_Simulation/CVD_Simulation.html +Other Python packages with similar functionality that you might want +to check out as well or instead: +* ``colour``: http://colour-science.org/ +* ``colormath``: http://python-colormath.readthedocs.org/ +* ``ciecam02``: https://pypi.python.org/pypi/ciecam02/ +* ``ColorPy``: http://markkness.net/colorpy/ColorPy.html + +%prep +%autosetup -n colorspacious-1.1.2 + +%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-colorspacious -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Thu Mar 09 2023 Python_Bot <Python_Bot@openeuler.org> - 1.1.2-1 +- Package Spec generated @@ -0,0 +1 @@ +2f457686bd0afb8b0816b68cd903b8f9 colorspacious-1.1.2.tar.gz |