Converts and optimizes images and 3D models
Go to file
Fabien LOISON 1b7b14b83d
Update windows build script and add a README and a license to the dist dir
2020-05-06 15:33:19 +02:00
assimp@b6b3b39bb3 update assimp 2020-04-06 10:23:05 +02:00
scripts script to generate MANIFEST.in 2018-01-17 15:06:42 +01:00
test Fixes #8 - Handling unicode paths 2018-05-15 11:05:06 +02:00
winbuild Update windows build script and add a README and a license to the dist dir 2020-05-06 15:33:19 +02:00
yoga Fixes unix build 2020-04-20 14:53:52 +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 Using strings for the CLI 2018-05-29 16:24:41 +02:00
.gitmodules Using HTTPS so that Travis is happy 2018-01-17 15:42:51 +01:00
.travis.yml update assimp 2020-03-25 11:26:54 +01:00
LICENSE Adds missing LICENSE file 2018-04-05 14:53:38 +02:00
MANIFEST.in update assimp 2020-03-25 11:26:54 +01:00
README.rst Build standalone Windows version 2020-04-17 15:22:56 +02:00
logo.png logo 2018-01-15 17:11:24 +01:00
requirements.txt update dependencies 2020-03-30 10:45:00 +02:00
setup.py Build standalone Windows version 2020-04-17 15:22:56 +02:00
tox.ini update assimp 2020-03-25 11:26:54 +01:00

README.rst

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

|Build Status| |PYPI Version| |License| |Gitter|

.. 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 and PNG,
* convert and optimize 3D models from various formats to `GLB`_.

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

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

Convert and optimize 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

Convert and optimize 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

.. _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
.. _assimp: https://github.com/assimp/assimp


Install
-------

From PYPI (Linux / Mac OS?)
~~~~~~~~~~~~~~~~~~~~~~~~~~~

First install the build dependencies::

   sudo apt install build-essential cmake python-dev python-setuptools

Then run the following command (as ``root`` on Linux)::

    pip install yoga


From this repository (Linux / Mac OS?)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

First install the build dependencies::

   sudo apt install build-essential cmake git python-dev python-setuptools

Then clone the repository::

    git clone https://github.com/wanadev/yoga.git

Go to the project's directory::

    cd yoga

Build and install using the following command::

    python setup.py install


Windows
~~~~~~~

The simplest way to use YOGA on Windows is to download the standalone builds available here:

* https://github.com/wanadev/yoga/releases

If you need YOGA as a library or if you really want to build it yourself, look in the ``winbuild`` folder.


Installing Development Dependencies
-----------------------------------

    pip install .[dev]


Changelog
---------

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


.. |Build Status| image:: https://travis-ci.org/wanadev/yoga.svg?branch=master
   :target: https://travis-ci.org/wanadev/yoga
.. |PYPI Version| image:: https://img.shields.io/pypi/v/yoga.svg
   :target: https://pypi.python.org/pypi/yoga
.. |License| image:: https://img.shields.io/pypi/l/yoga.svg
   :target: https://github.com/wanadev/yoga/blob/master/LICENSE
.. |Gitter| image:: https://badges.gitter.im/gitter.svg
   :target: https://gitter.im/wanadev/yoga