yoga

Converts and optimizes images and 3D models

https://github.com/wanadev/yoga

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.7%) to scientific vocabulary

Keywords

assimp glb gltf image jpeg optimizer png python

Keywords from Contributors

gravitational-lenses profiling interactive transformer distribution packaging projection standardization embedded genomics
Last synced: 6 months ago · JSON representation

Repository

Converts and optimizes images and 3D models

Basic Info
Statistics
  • Stars: 104
  • Watchers: 9
  • Forks: 13
  • Open Issues: 14
  • Releases: 15
Topics
assimp glb gltf image jpeg optimizer png python
Created about 8 years ago · Last pushed 6 months ago
Metadata Files
Readme License

README.rst

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

* See `the install section of the documentation `_


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

* `Command Line Interface (CLI) `_
* `Python API `_
* `Contributing `_


Changelog
---------

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

  * Nothing yet ;)

* **v1.3.3-1:**

  * fix(standalone): Fixed standalone builds (missing ``_cffi_backend``) (#72, @flozz)
  * misc(standalone): Removed an old hack from Windows standalone build script (@flozz)
  * misc(ci): Added test to ensure standalone builds are working before releasing them... (#72, @flozz)
  * misc(deps): Updated Nuitka to v3.5.9 (@flozz)
  * **NOTE:** This release only fixes standalone builds; the YOGA code did not change so there is no new version published on PyPI.

* **v1.3.3:**

  * fix(build): Added missing setuptools versions pinning that break the PyPy builds (@flozz)

* **v1.3.2 / v1.3.2-1:**

  * fix(build): Fixed Windows build with recent setuptools versions (@flozz)
  * fix(release): Updated, fixed and improved standalone build scripts and CI (@flozz)
  * misc: Added Python 3.13 support (@flozz)
  * misc!: Removed Python 3.8 support (@flozz)

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

* **v1.3.1:**

  * chore(sdist): Fixed included files in sdist package (@flozz)

* **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)
  * docs: Updated contributing documentation (libraries, supported Python
    version, assimp update) (@flozz)

* **v1.2.3:**

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

* **v1.2.2:**

  * Updated the code to not use deprecated constants on newer Pillow versions
  * Various typo fixed (@kianmeng, #45)
  * Added Python 3.11 support

* **v1.2.1:**

  * No change: fix an upload error on PYPI

* **v1.2.0:**

  * Add color quantization options (based on libimagequant)
  * ``arm64`` and ``universal2`` wheels for macOS
  * ``x86`` and ``x68_64`` wheels for musl-based Linux distro (Alpine,...)
  * **MAINTAINERS:** New dependency: `imagequant `_

* **v1.1.2:**

  * Add flag to CFFI builder to fix MacOS build

* **v1.1.1 (not published):**

  * JPEG: ignore invalid values for the orientation tag (#38)
  * Python 3.10 support and wheels

* **v1.1.0:**

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

    * new dependency to `mozjpeg-lossless-optimization
      `_

* **v1.0.0:**

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

* **v0.11.1:**

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

* **v0.11.0:**

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

* **v0.10.2:**

  * Updates assimp and python libraries

* **v0.10.1:**

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

* **v0.10.0:**

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

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

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

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

Owner

  • Name: Wanadev
  • Login: wanadev
  • Kind: organization
  • Location: Lyon, France

GitHub Events

Total
  • Create event: 13
  • Issues event: 2
  • Release event: 2
  • Watch event: 5
  • Delete event: 7
  • Issue comment event: 5
  • Push event: 30
  • Pull request event: 17
  • Fork event: 1
Last Year
  • Create event: 13
  • Issues event: 2
  • Release event: 2
  • Watch event: 5
  • Delete event: 7
  • Issue comment event: 5
  • Push event: 30
  • Pull request event: 17
  • Fork event: 1

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 356
  • Total Committers: 7
  • Avg Commits per committer: 50.857
  • Development Distribution Score (DDS): 0.287
Past Year
  • Commits: 29
  • Committers: 2
  • Avg Commits per committer: 14.5
  • Development Distribution Score (DDS): 0.448
Top Committers
Name Email Commits
Fabien LOISON f****o@f****m 254
Alexis Breust a****t@w****r 63
dependabot[bot] 4****] 24
Alexis Breust a****t@g****m 7
Vincent Riche v****e@w****r 6
Kian-Meng Ang k****g@c****g 1
Damien Fernandes d****4@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 33
  • Total pull requests: 52
  • Average time to close issues: 21 days
  • Average time to close pull requests: 19 days
  • Total issue authors: 15
  • Total pull request authors: 7
  • Average comments per issue: 2.09
  • Average comments per pull request: 0.23
  • Merged pull requests: 48
  • Bot issues: 0
  • Bot pull requests: 34
Past Year
  • Issues: 2
  • Pull requests: 18
  • Average time to close issues: N/A
  • Average time to close pull requests: about 8 hours
  • Issue authors: 2
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.11
  • Merged pull requests: 16
  • Bot issues: 0
  • Bot pull requests: 18
Top Authors
Issue Authors
  • Breush (8)
  • flozz (6)
  • lapineige (4)
  • LeoNicolle (2)
  • Krenodeno (2)
  • nekohayo (2)
  • mkleins (1)
  • aardvarksaurus (1)
  • nathanidp (1)
  • Popolon (1)
  • Dazuzi (1)
  • shlagevuk (1)
  • henrytriplette (1)
  • dependabot[bot] (1)
  • vincentriche (1)
Pull Request Authors
  • dependabot[bot] (46)
  • Breush (11)
  • flozz (3)
  • damienfern (2)
  • kianmeng (1)
  • LeoNicolle (1)
  • vincentriche (1)
Top Labels
Issue Labels
enhancement (7) bug (4) invalid (1) question (1) dependencies (1)
Pull Request Labels
dependencies (46) github_actions (11)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 1,062 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 3
  • Total versions: 19
  • Total maintainers: 2
pypi.org: yoga

Yummy Optimizer for Gorgeous Assets

  • Versions: 19
  • Dependent Packages: 1
  • Dependent Repositories: 3
  • Downloads: 1,062 Last month
Rankings
Dependent packages count: 4.8%
Stargazers count: 7.3%
Average: 8.0%
Downloads: 8.5%
Dependent repos count: 8.9%
Forks count: 10.5%
Maintainers (2)
Last synced: 6 months ago

Dependencies

requirements.dev.txt pypi
  • Babel ==2.9.1 development
  • Jinja2 ==2.11.3 development
  • MarkupSafe ==1.1.1 development
  • Pygments ==2.8.1 development
  • Sphinx ==3.5.4 development
  • alabaster ==0.7.12 development
  • appdirs ==1.4.4 development
  • argcomplete ==1.12.2 development
  • attrs ==20.3.0 development
  • certifi ==2020.12.5 development
  • chardet ==4.0.0 development
  • colorlog ==4.8.0 development
  • distlib ==0.3.1 development
  • docutils ==0.16 development
  • filelock ==3.0.12 development
  • flake8 ==3.9.1 development
  • idna ==2.10 development
  • imagesize ==1.2.0 development
  • iniconfig ==1.1.1 development
  • mccabe ==0.6.1 development
  • nox ==2020.12.31 development
  • packaging ==20.9 development
  • pluggy ==0.13.1 development
  • py ==1.10.0 development
  • pycodestyle ==2.7.0 development
  • pyflakes ==2.3.1 development
  • pyparsing ==2.4.7 development
  • pytest ==6.2.3 development
  • pytz ==2021.1 development
  • requests ==2.25.1 development
  • six ==1.15.0 development
  • snowballstemmer ==2.1.0 development
  • sphinx-rtd-theme ==0.5.2 development
  • sphinxcontrib-applehelp ==1.0.2 development
  • sphinxcontrib-devhelp ==1.0.2 development
  • sphinxcontrib-htmlhelp ==1.0.3 development
  • sphinxcontrib-jsmath ==1.0.1 development
  • sphinxcontrib-qthelp ==1.0.3 development
  • sphinxcontrib-serializinghtml ==1.1.4 development
  • toml ==0.10.2 development
  • urllib3 ==1.26.6 development
  • virtualenv ==20.4.3 development
requirements.txt pypi
  • Pillow ==9.1.1
  • Unidecode ==1.2.0
  • cffi ==1.14.5
  • imagequant ==1.0.2
  • mozjpeg-lossless-optimization ==1.0.0
  • pycparser ==2.20
  • pyguetzli ==1.0.9
  • zopflipy ==1.5
setup.py pypi
  • cffi >=1.0.0
  • imagequant >=1.0.2
  • mozjpeg-lossless-optimization >=1.0.0
  • pillow >=6.2.2
  • pyguetzli >=1.0.0
  • unidecode >=1.0.0
  • zopflipy >=1.0
winbuild/requirements.txt pypi
  • nuitka ==0.9
.github/workflows/gh-pages.yml actions
  • JamesIves/github-pages-deploy-action v4 composite
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
.github/workflows/python-ci.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
.github/workflows/python-packages.yml actions
  • actions/checkout v4 composite
  • actions/download-artifact v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
  • pypa/cibuildwheel v2.16.1 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/winbuild.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
pyproject.toml pypi