yoga/README.rst

209 lines
6.5 KiB
ReStructuredText
Raw Normal View History

2017-12-08 10:33:10 +01:00
YOGA - Yummy Optimizer for Gorgeous Assets
==========================================
2021-04-26 17:04:39 +02:00
|Github| |Discord| |PYPI Version| |Build Status| |Black| |License|
2018-05-04 17:44:03 +02:00
.. figure:: https://github.com/wanadev/yoga/raw/master/logo.png
2018-01-15 17:11:24 +01:00
:alt:
**YOGA** is a command-line tool and a library that can:
2018-01-15 16:55:57 +01:00
2021-04-16 10:17:47 +02:00
* convert and optimize images from various format to JPEG, PNG and WEBP,
2021-01-20 16:42:30 +01:00
* convert and optimize 3D models from various formats to `glTF and GLB`_.
2018-01-15 16:55:57 +01:00
**Images** are opened using Pillow_ and optimized using Guetzli_ and MozJPEG_
for JPEGs, Zopflipng_ for PNGs and libwebp_ for WEBPs.
2018-01-15 16:55:57 +01:00
2018-01-15 17:22:07 +01:00
**3D Models** are converted and optimized using assimp_. If models contain or
2018-01-15 16:55:57 +01:00
reference images, they are processed by YOGA's image optimizer.
2021-01-20 16:38:30 +01:00
EXAMPLE: Converting and optimizing an image from CLI::
2018-01-15 16:55:57 +01:00
2018-01-15 17:11:24 +01:00
yoga image input.png output.png
2018-01-15 16:55:57 +01:00
yoga image --output-format=jpeg --jpeg-quality=84 input.png output.jpg
yoga image --help
2021-01-20 16:38:30 +01:00
EXAMPLE: Converting and optimizing a 3D model from CLI::
2018-01-15 16:55:57 +01:00
yoga model input.fbx output.glb
yoga model --no-graph-optimization --no-meshes-optimization --image-output-format=jpeg --image-jpeg-quality=84 input.fbx output.glb
2018-01-15 16:55:57 +01:00
yoga model --help
2018-01-15 17:22:07 +01:00
2021-01-20 16:42:30 +01:00
.. _glTF and GLB: https://www.khronos.org/gltf/
2018-01-15 17:22:07 +01:00
.. _Pillow: https://github.com/python-pillow/Pillow
.. _Guetzli: https://github.com/google/guetzli
.. _MozJPEG: https://github.com/mozilla/mozjpeg
2018-01-15 17:22:07 +01:00
.. _Zopflipng: https://github.com/google/zopfli
2021-04-16 10:17:47 +02:00
.. _libwebp: https://chromium.googlesource.com/webm/libwebp/
2018-01-15 17:22:07 +01:00
.. _assimp: https://github.com/assimp/assimp
2018-02-19 16:10:09 +01:00
Install
-------
2021-01-20 16:38:30 +01:00
* See `the install section of the documentation <https://wanadev.github.io/yoga/install.html>`_
2021-01-20 16:38:30 +01:00
Documentation
-------------
2021-01-20 16:38:30 +01:00
* `Command Line Interface (CLI) <https://wanadev.github.io/yoga/cli/index.html>`_
* `Python API <https://wanadev.github.io/yoga/python/index.html>`_
* `Contributing <https://wanadev.github.io/yoga/contributing.html>`_
2019-02-22 16:32:57 +01:00
2018-02-19 16:10:09 +01:00
Changelog
---------
2021-06-23 11:17:26 +02:00
* **[NEXT]** (changes on ``master`` that have not been released yet):
2024-01-07 11:57:21 +01:00
* Nothing yet ;)
2024-04-17 11:09:48 +02:00
* **v1.3.1-1:**
* This version has no code change from the v1.3.1. It is only an update of
the distribution :
* A brand new standalone version was build for Linux
* The Windows standalone distribution was updated (changes in documentation)
* dist: Added scripts to build a standalone binary version of YOGA on Linux
2024-01-07 11:57:21 +01:00
* **v1.3.1:**
* chore(sdist): Fixed included files in sdist package (@flozz)
2024-01-06 16:56:39 +01:00
* **v1.3.0:**
* feat(assimp): Updated assimp to v5.3.1 (fixed build on GCC >= 13) (@flozz)
* chore: Removed a script that is no more needed (@flozz)
2024-01-06 16:48:54 +01:00
* docs: Updated contributing documentation (libraries, supported Python
version, assimp update) (@flozz)
2023-10-06 14:17:05 +02:00
* **v1.2.3:**
2023-08-28 10:14:38 +02:00
* Code quality: more robust type comparison (@flozz)
* Code quality: cleanup some Python 2.7 specific code (@flozz)
* Added Python 3.12 support (@flozz)
* Removed Python 3.7 support (@flozz)
2022-10-29 13:37:12 +02:00
* **v1.2.2:**
* Updated the code to not use deprecated constants on newer Pillow versions
2022-10-18 10:02:25 +02:00
* Various typo fixed (@kianmeng, #45)
* Added Python 3.11 support
2022-06-27 11:49:55 +02:00
2022-10-29 13:37:12 +02:00
* **v1.2.1:**
2022-06-27 17:38:38 +02:00
* No change: fix an upload error on PYPI
2022-10-29 13:37:12 +02:00
* **v1.2.0:**
2022-06-27 11:49:55 +02:00
2022-05-12 17:04:40 +02:00
* Add color quantization options (based on libimagequant)
2022-06-27 11:39:22 +02:00
* ``arm64`` and ``universal2`` wheels for macOS
* ``x86`` and ``x68_64`` wheels for musl-based Linux distro (Alpine,...)
* **MAINTAINERS:** New dependency: `imagequant <https://github.com/wanadev/imagequant-python>`_
2021-10-14 16:02:39 +02:00
2022-10-29 13:37:12 +02:00
* **v1.1.2:**
2021-10-15 10:00:48 +02:00
* Add flag to CFFI builder to fix MacOS build
2022-10-29 13:37:12 +02:00
* **v1.1.1 (not published):**
2021-10-14 16:02:39 +02:00
* JPEG: ignore invalid values for the orientation tag (#38)
* Python 3.10 support and wheels
2021-08-27 14:01:56 +02:00
2022-10-29 13:37:12 +02:00
* **v1.1.0:**
2021-08-27 14:01:56 +02:00
* **JPEG Optimization:**
* Honor the JPEG orientation EXIF tag
* JPEG optimization has been improved by using some optimizations from
MozJPEG after the Guetzli encoding (from 2.4 % to 7.3 % of additional size
reduction)
* **PNG Optimization:**
* YOGA can no more output a PNG larger than the input one when performing
a PNG to PNG optimization
* **CLI:**
* Allow to cancel an optimization using Ctrl+C (NOTE: may not work on
Windows)
* Add a ``--version`` option to get YOGA's version
* Improve ``yoga --help`` usage
* **Python versions:**
* Python 2.7 support dropped
* **NOTE for packagers:**
2021-08-09 14:30:13 +02:00
* new dependency to `mozjpeg-lossless-optimization
<https://github.com/wanadev/mozjpeg-lossless-optimization>`_
2021-06-23 11:17:26 +02:00
2022-10-29 13:37:12 +02:00
* **v1.0.0:**
2021-04-27 20:12:49 +02:00
* WEBP (lossy and lossless) images supported as output format
* PNG default optimization preset changed to a 10× faster preset (old preset
2022-10-15 11:12:10 +02:00
still available with ``--png-slow-optimization`` flag)
2021-04-27 20:12:49 +02:00
* New model flag ``--no-fix-infacing-normals`` to disable Assimp's "fix
infacing normals" postprocess (#32, #33)
* Show CLI usage when no parameter given
* Developer documentation improved (#31)
* ASSIMP library updated
* WARNING: This is the last version to actively support Python 2.7!
2022-10-29 13:37:12 +02:00
* **v0.11.1:**
2021-03-09 18:31:41 +01:00
* Automated workflow for deploying the PyPI packages
* Wheel are now distributed on PyPI
2022-10-29 13:37:12 +02:00
* **v0.11.0:**
2020-05-07 10:56:53 +02:00
* Allows to build YOGA on Windows
* Scripts and workflow to build Windows standalone versions
2022-10-29 13:37:12 +02:00
* **v0.10.2:**
2019-02-22 16:34:55 +01:00
* Updates assimp and python libraries
2022-10-29 13:37:12 +02:00
* **v0.10.1:**
2018-11-20 11:23:54 +01:00
2022-10-15 11:12:10 +02:00
* Fixes an issue that occurs when output file does not already exist
2018-11-20 11:23:54 +01:00
2022-10-29 13:37:12 +02:00
* **v0.10.0:**
2018-05-29 16:24:41 +02:00
2018-06-13 14:34:03 +02:00
* Prevent overwriting of the output file when an error occurs (#17)
* Unicode path support (#16)
2018-05-29 16:24:41 +02:00
2022-10-29 13:37:12 +02:00
* **v0.10.0b1:**
2018-05-14 10:42:22 +02:00
* Verbose and quiet modes,
* Allows to pass textures from memory instead of looking on the filesystem,
* Allows to pass a fallback texture instead of raising an error.
2022-10-29 13:37:12 +02:00
* **v0.9.1b1:**
2018-04-05 14:50:13 +02:00
2018-04-05 14:41:21 +02:00
* Automatic selection of the output format (png or jpeg),
* Prevent duplication of textures that are shared between materials,
* Fixes Windows paths of textures.
2018-04-05 14:50:13 +02:00
2022-10-29 13:37:12 +02:00
* **v0.9.0b1:** First release (only GLB output for models, no image auto
2018-02-19 16:10:09 +01:00
output format)
2018-05-04 17:44:03 +02:00
2018-06-13 14:32:18 +02:00
2021-01-22 16:02:26 +01:00
.. |Github| image:: https://img.shields.io/github/stars/wanadev/yoga?label=Github&logo=github
:target: https://github.com/wanadev/yoga
.. |Discord| image:: https://img.shields.io/badge/chat-Discord-8c9eff?logo=discord&logoColor=ffffff
:target: https://discord.gg/BmUkEdMuFp
2018-05-04 17:44:03 +02:00
.. |PYPI Version| image:: https://img.shields.io/pypi/v/yoga.svg
:target: https://pypi.python.org/pypi/yoga
2021-01-22 16:02:26 +01:00
.. |Build Status| image:: https://github.com/wanadev/yoga/workflows/Python%20CI/badge.svg
:target: https://github.com/wanadev/yoga/actions
2021-04-26 17:04:39 +02:00
.. |Black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://black.readthedocs.io/en/stable/
2018-05-04 17:44:03 +02:00
.. |License| image:: https://img.shields.io/pypi/l/yoga.svg
:target: https://github.com/wanadev/yoga/blob/master/LICENSE