Giter VIP home page Giter VIP logo

yoga's Introduction

YOGA - Yummy Optimizer for Gorgeous Assets

Github Discord PYPI Version Build Status Black License

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

Install

Documentation

Changelog

  • [NEXT] (changes on master that have not been released yet):
    • Update the code to not use deprecated constants on newer Pillow versions
  • 1.2.1:
    • No change: fix an upload error on PYPI
  • 1.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
  • 1.1.2:
    • Add flag to CFFI builder to fix MacOS build
  • 1.1.1 (not published):
    • JPEG: ignore invalid values for the orientation tag (#38)
    • Python 3.10 support and wheels
  • 1.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:
  • 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)

yoga's People

Contributors

flozz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.