• Stars
    star
    132
  • Rank 265,837 (Top 6 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created over 3 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A graphical tool to convert and optimize JPEG, PNG and WebP images (based on YOGA)

YOGA Image Optimizer

GitHub License Discord Github Actions Black

YOGA Image Optimizer is a graphical user interface for YOGA Image that converts and optimizes the size of JPEG, PNG and WebP image files.

YOGA Image Optimizer screenshot

Requirements

  • PyCairo
  • PyGObject ≥ 3.36
  • Python ≥ 3.7
  • YOGA ≥ 1.1.0

Installation

Arch Linux

The package is available on AUR (yoga-image-optimizer):

Flatpak (Linux)

A Flatpak package is available on Flathub. This is currently the simplest way to install YOGA Image Optimizer on all major Linux distributions:

Linux (PyPI)

You must install the dependencies on your system first. It can be done via the following command on Debian and Ubuntu:

sudo apt install git build-essential python3 python3-dev python3-pip libgirepository1.0-dev libcairo2-dev pkg-config gir1.2-gtk-3.0

Then install YOGA Image Optimizer with pip:

sudo pip3 install yoga-image-optimizer

NOTE: Installing from PyPI will not install .desktop file and manual page; you will not be able to run the software from your graphical app menu (GNOME Shell etc.).

Linux (source)

You must install the dependencies on your system first. It can be done via the following command on Debian and Ubuntu:

sudo apt install git build-essential python3 python3-dev python3-pip libgirepository1.0-dev libcairo2-dev pkg-config gir1.2-gtk-3.0

Then clone this repository and navigate to it:

git clone https://github.com/flozz/yoga-image-optimizer.git
cd yoga-image-optimizer

Then install YOGA Image Optimizer using pip:

sudo pip3 install .

Finally, you can install the .desktop file, icons and manual page using the following command:

sudo ./linuxpkg/copy-data.sh /usr

Windows

Download either the portable .zip version or the Windows installer from the releases page:

Usage

Just type the following command to run YOGA Image Optimizer:

yoga-image-optimizer

You can also give some image files to open:

yoga-image-optimizer  image1.png  image2.jpeg

NOTE: If you installed YOGA Image Optimizer from Flathub, you will have to run the following command instead:

flatpak run org.flozz.yoga-image-optimizer  image1.png  image2.jpeg

Contributing

Questions

If you have any question, you can:

Bugs

Please open an issue on GitHub with as much information as possible if you found a bug:

  • Your operating system / Linux distribution (and its version)
  • How you installed the software
  • All the logs and message outputted by the software
  • etc.

Pull requests

Please consider filing a bug before starting to work on a new feature; it will allow us to discuss the best way to do it. It is obviously unnecessary if you just want to fix a typo or small errors in the code.

Please note that your code must follow the coding style defined by the pep8 and pass tests. Black and Flake8 are used on this project to enforce the coding style.

Translate YOGA Image Optimizer

You can help translating it if the software is not available on your language.

To translate YOGA Image Optimizer, you can submit your translations creating a pull request on GitHub.

Do not forget to add your name as the translation of the translator-credits key (one name per line, email is optional):

#: yoga_image_optimizer/about_dialog.py:38
msgid "translator-credits"
msgstr ""
"John DOE\n"
"Other TRANSLATOR <[email protected]>\n"

Run the tests

You must install Nox first:

pip3 install nox

Then you can check for lint error:

nox --session lint

or run the tests:

nox --session test

You can use following commands to run the tests only on a certain Python version (the corresponding Python interpreter must be installed on your machine):

nox --session test-3.7
nox --session test-3.8
nox --session test-3.9
nox --session test-3.10
nox --session test-3.11

You can also fix coding style errors automatically with:

nox -s black_fix

Build, extract or update build translations

You must install Nox first:

pip3 install nox

To extract messages and update locales, run:

nox --session locales_update

To compile locales, run:

nox --session locales_compile

NOTE: you must have msgfmt, msgmerge and xgettext executable installed on your system to run the above commands. It can be done via the following command on Debian and Ubuntu:

sudo apt install gettext

Support this project

Want to support this project?

Changelog

  • [NEXT] (changes on master, but not released yet):
    • Nothing yet ;)
  • v1.2.3:
    • Fixed crash when the system locale cannot be determined (@flozz, #43)
  • v1.2.2:
    • Bug fix:
      • Fixed an issue that prevents the update of the view with older Pango versions (@flozz, #41)
    • Translations:
      • Updated Italian translation (@albanobattistella, #39)
      • Updated Spanish translation (@haggen88, #42)
  • v1.2.1:
    • Fixes / improvements:
      • Flatpak: use the real user cache, not the one of the Flatpak application (@flozz)
      • Added Python 3.11 support (@flozz)
    • Translations:
      • Added Brazilian Portuguese translation (@Kazevic, #36)
      • Completed Dutch translation (@Vistaus, #34)
  • v1.2.0:
    • Interface / user experience:
      • More compact and less bloated interface (#17)
      • Allow opening input images in the default image viewer by double-clicking them
      • Asynchronous generation and loading of thumbnails to not freeze the interface when importing a lot of images (#26)
      • Sped up thumbnail loading on Linux by using already generated thumbnails from the shared cache
      • Sped up thumbnail generation using BOX sampling instead of LANCZOS
      • Show a warning icon if the output image is larger than the input one
    • Fixes / improvements:
      • Fixed a crash when generating thumbnails for JPEGs with an invalid orientation EXIF tag (#29)
      • Fixed a crash on the image import process when generating a broken image's thumbnail (#27)
      • Fixed a crash on the optimization batch if an error occurs when optimizing an image (#27)
      • Fixed inverted width and height with rotated JPEGs
      • Fixed issues related to concurrent.futures on Python 3.7 and 3.8 (#32)
      • Updated the code to not use deprecated constants on newer Pillow versions
    • New translations:
      • Dutch (incomplete) (@Vistaus, #25)
      • German (Jürgen Benvenuti)
  • v1.1.2:
    • New translations:
      • Russian
      • Spanish
    • Updated translation:
      • Turkish
  • v1.1.1:
    • Fixed the abnormal amount of processes created and not cleaned when starting an optimization (#13)
  • v1.1.0:
    • YOGA updated to v1.1.0:
      • Honor the JPEG orientation EXIF tag
      • JPEG optimization improved: up to 7.3% of additional size reduction since previous version
      • YOGA can no more output a PNG larger than the input one when performing a PNG to PNG optimization
    • Added a setting window:
      • Number of threads used to optimize images
      • Setting the default output locations / name or pattern of output files
      • Theme selection / dark theme preference
    • "Optimize" and "Stop" buttons behaviour improved:
      • The "Stop" button now stops the running optimizations, not just the pending ones
      • Display a "Canceled" status on non-optimized image while the "Stop" button is clicked
      • Do not optimize again images that have already been optimized
    • Allow to resize images (downscale only, preserve ratio)
    • Multiselection: multiple files can now be selected and their parameters can be edited all at once (multiselection)
    • Windows specific changes:
      • Use the Adwaita theme by default on Windows; the Windows10 GTK theme looks buggy
    • Fixes / improvements:
      • Do not allow to remove images with the <Del> key while an optimization is in progress
      • Fixed image previews; no more ugly thumbnails with indexed images
      • Image previews now honor the JPEG orientation EXIF tag
    • Updated translations:
      • French
      • Italian (partial)
      • Occitan
      • Turkish (partial)
    • Note for packagers:
  • v1.0.1:
    • Fixed PyPI packages
    • NOTE: No new version for Windows; nothing changed
  • v1.0.0:
    • Fixed [-] button not removing the chosen image
    • Updated site URL
  • v0.99.2 (beta):
    • Fixed package data not installed while installing with pip (#3)
    • NOTE: No new version for Windows; nothing changed
  • v0.99.1 (beta):
    • Fixed site URL in setup.py
    • Fixed version number
  • v0.99.0 (beta):
    • Initial release
    • Linux and Windows support
    • Optimizes JPEG, PNG and WebP image formats

More Repositories

1

p0wny-shell

Single-file PHP shell
PHP
1,894
star
2

StackBlur

Fast and almost Gaussian blur
JavaScript
1,242
star
3

rivalcfg

CLI tool and Python library to configure SteelSeries gaming mice
Python
737
star
4

nautilus-terminal

A terminal embedded in Nautilus, the GNOME's file browser
Python
310
star
5

gameboy-examples

Example programs that run on the Nintendo GameBoy
C
79
star
6

cover-thumbnailer

Generates folder thumbnails for various file browser on Linux to display music album covers, preview of pictures which are in a folder and more.
Python
72
star
7

threadify

Simply transforms a javascript function into a web worker
JavaScript
62
star
8

evoland.gb

A fan-made demake of Evoland on GameBoy
C
37
star
9

pypapi

Python binding for the PAPI (Performance Application Programming Interface) library
Python
36
star
10

img2gb

Converts images to GameBoy tiles
Python
32
star
11

stone.js

gettext-like client-side Javascript Internationalization Library
JavaScript
23
star
12

asus-keyboard-backlight

Configure the keyboard backlight on ASUS laptops.
Python
16
star
13

calcleaner

A simple graphical tool to purge old events from CalDAV calendars
Python
16
star
14

stonejs-tools

Tools for extracting/compiling translatable strings from javascript source
JavaScript
12
star
15

pavage

Lightweight library to arrange HTML elements in a Waterfall / Pinterest-like column layout
JavaScript
12
star
16

twitch-api-examples

Examples that use Twitch APIs to display notifications in OBS
JavaScript
7
star
17

shmined

The minesweeper game, in Bash!
Shell
5
star
18

tern-abitbol

Tern.js plugin to autocomplete Abitbol classes
JavaScript
4
star
19

maptosym

Generates no$gmb symbole files (.sym) from GBDK and SDCC / ASxxxx map files (.map)
Python
4
star
20

rst2gemtext

Converts reStructuredText to Gemtext (Gemini markup format)
Python
4
star
21

suorafxctl

Configure Roccat Suora FX keyboards on Linux
Python
4
star
22

grunt-stonejs-tools

Stone.js Grunt plugin to extract / compile translatable strings
JavaScript
3
star
23

pipe.js

Simply queue asynchrone jobs in javascript.
JavaScript
3
star
24

simple-screencast

Simple screen recording application for GNOME Shell
Python
3
star
25

webassembly-examples

Example WebAssembly programs
HTML
3
star
26

KeyboardJS

This is a fork of an old KeyboardJS version that is required by some old projects... DO NOT USE ON NEW PROJECTS...
JavaScript
3
star
27

vim-color-picker

A GTK 2 color picker for VIM
Vim Script
2
star
28

tdct-live-irc-bot

An IRC bot to follow the TdCT on ##tdct-live (irc.freenode.net)
JavaScript
2
star
29

tetrize

A Tetris-like game in Java
Java
2
star
30

damn-monkey

A Donkey Kong-like game
C
2
star
31

hangman8086

An implementation of the Hang Man game in assembly (Emu8086)
Assembly
2
star
32

yoga-image-benchmark

Python
1
star
33

.vim

My VIM config
Vim Script
1
star