Converts and optimizes images and 3D models
Go to file
Fabien LOISON d74d9bd5ca
Drop Python 2.7 support
2021-06-23 11:17:26 +02:00
.github/workflows Drop Python 2.7 support 2021-06-23 11:17:26 +02:00
assimp@21d7085be6 Update assimp 2021-04-27 11:05:21 +02:00
doc Add packager's documentation 2021-06-18 15:03:35 +02:00
scripts Update included files 2021-04-27 11:21:48 +02:00
test Drop Python 2.7 support 2021-06-23 11:17:26 +02:00
winbuild Fixes WEBP support in standelone Windows build 2021-04-27 17:22:29 +02:00
yoga Drop Python 2.7 support 2021-06-23 11:17:26 +02:00
.flake8 Updates Black and Flake8 config 2021-04-06 15:58:23 +02:00
.gitattributes Update windows build script and add a README and a license to the dist dir 2020-05-06 15:33:19 +02:00
.gitignore Change default PNG optimization preset (the old one is available with --png-slow-optimization) 2021-04-26 16:28:16 +02:00
.gitmodules Using HTTPS so that Travis is happy 2018-01-17 15:42:51 +01:00
LICENSE v0.11.0 2020-05-07 10:56:53 +02:00
MANIFEST.in Update included files 2021-04-27 11:21:48 +02:00
README.rst Drop Python 2.7 support 2021-06-23 11:17:26 +02:00
logo.png logo 2018-01-15 17:11:24 +01:00
noxfile.py Drop Python 2.7 support 2021-06-23 11:17:26 +02:00
pyproject.toml Drop Python 2.7 support 2021-06-23 11:17:26 +02:00
requirements.dev.txt Updates CONTRIBUTING doc (closes #31) 2021-04-16 11:40:03 +02:00
requirements.txt Updates CONTRIBUTING doc (closes #31) 2021-04-16 11:40:03 +02:00
setup.py v1.0.0 2021-04-27 20:12:49 +02:00

README.rst

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

YOGA - Yummy Optimizer for Gorgeous Assets
==========================================

|Github| |Discord| |PYPI Version| |Build Status| |Black| |License|

.. figure:: https://github.com/wanadev/yoga/raw/master/logo.png
   :alt:

**YOGA** is a command-line tool and a library that can:

* convert and optimize images from various format to JPEG, PNG and WEBP,
* convert and optimize 3D models from various formats to `glTF and GLB`_.

**Images** are opened using Pillow_ and optimized using Guetzli_ (for JPEGs),
Zopflipng_ (for PNGs) and libwebp_ (for WEBPs).

**3D Models** are converted and optimized using assimp_. If models contain or
reference images, they are processed by YOGA's image optimizer.

EXAMPLE: Converting and optimizing an image from CLI::

    yoga  image  input.png  output.png
    yoga  image  --output-format=jpeg  --jpeg-quality=84  input.png  output.jpg
    yoga  image  --help

EXAMPLE: Converting and optimizing a 3D model from CLI::

    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
    yoga  model  --help

.. _glTF and GLB: https://www.khronos.org/gltf/
.. _Pillow: https://github.com/python-pillow/Pillow
.. _Guetzli: https://github.com/google/guetzli
.. _Zopflipng: https://github.com/google/zopfli
.. _libwebp: https://chromium.googlesource.com/webm/libwebp/
.. _assimp: https://github.com/assimp/assimp


Install
-------

* See `the install section of the documentation <https://wanadev.github.io/yoga/install.html>`_


Documentation
-------------

* `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>`_


Changelog
---------

* **[NEXT]** (changes on ``master`` that have not been released yet):

  * Python 2.7 support dropped

* **1.0.0:**

  * WEBP (lossy and lossless) images supported as output format
  * PNG default optimization preset changed to a 10× faster preset (old preset
    stil available with ``--png-slow-optimization`` flag)
  * 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!

* **0.11.1:**

  * Automated workflow for deploying the PyPI packages
  * Wheel are now distributed on PyPI

* **0.11.0:**

  * Allows to build YOGA on Windows
  * Scripts and workflow to build Windows standalone versions

* **0.10.2:**

  * Updates assimp and python libraries

* **0.10.1:**

  * Fixes an issue that occures when output file does not already exist

* **0.10.0:**

  * Prevent overwriting of the output file when an error occurs (#17)
  * Unicode path support (#16)

* **0.10.0b1:**

  * 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.

* **0.9.1b1:**

  * Automatic selection of the output format (png or jpeg),
  * Prevent duplication of textures that are shared between materials,
  * Fixes Windows paths of textures.

* **0.9.0b1:** First release (only GLB output for models, no image auto
  output format)


.. |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
.. |PYPI Version| image:: https://img.shields.io/pypi/v/yoga.svg
   :target: https://pypi.python.org/pypi/yoga
.. |Build Status| image:: https://github.com/wanadev/yoga/workflows/Python%20CI/badge.svg
   :target: https://github.com/wanadev/yoga/actions
.. |Black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
   :target: https://black.readthedocs.io/en/stable/
.. |License| image:: https://img.shields.io/pypi/l/yoga.svg
   :target: https://github.com/wanadev/yoga/blob/master/LICENSE