wanadev / yoga

Converts and optimizes images and 3D models
https://wanadev.github.io/yoga/
Other
99 stars 13 forks source link
assimp glb gltf image jpeg optimizer png python

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:

Images are opened using Pillow and optimized using Guetzli and MozJPEG 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 .. _MozJPEG: https://github.com/mozilla/mozjpeg .. _Zopflipng: https://github.com/google/zopfli .. _libwebp: https://chromium.googlesource.com/webm/libwebp/ .. _assimp: https://github.com/assimp/assimp

Install

Documentation

Changelog

.. |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/actions/workflows/python-ci.yml/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