A graphical interface to convert and optimize JPEG, PNG and WebP images (based on YOGA)
Project description
YOGA Image Optimizer is a graphical user interface for YOGA Image that converts and optimizes the size of JPEG, PNG and WebP image files.
Requirements
PyCairo
PyGObject ≥ 3.36
Python ≥ 3.8
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:
Open an issue on GitHub
Ask on Discord (I am not always available to chat, but I try to answer to everyone)
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 <foobar@example.org>\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.8 nox --session test-3.9 nox --session test-3.10 nox --session test-3.11 nox --session test-3.12
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.4:
i18n: Updated Occitan translation (@Mejans, #53)
misc: Added Python 3.12 support (@flozz)
misc!: Removed Python 3.7 support (@flozz)
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:
YOGA ≥ 1.1.0 is now needed
YOGA v1.1.0 has a new dependency: mozjpeg-lossless-optimization
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file yoga_image_optimizer-1.2.4.tar.gz
.
File metadata
- Download URL: yoga_image_optimizer-1.2.4.tar.gz
- Upload date:
- Size: 84.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca80c18f5aba2aaee258b0f48e47fca2a74a96c5febc4fed908009494cc33e92 |
|
MD5 | 00e353424c3175111d6b253005e5c997 |
|
BLAKE2b-256 | cb62f3175cee57d6d8490f1270b3329d13121ce96315023d3c24d838f0d04fa4 |
File details
Details for the file yoga_image_optimizer-1.2.4-py3-none-any.whl
.
File metadata
- Download URL: yoga_image_optimizer-1.2.4-py3-none-any.whl
- Upload date:
- Size: 98.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3c3027f886df9c241d1f7d57f5570d9fdf952174cde8c7e1787acbbdcd6f4fd |
|
MD5 | 308fdfa7d00c1ffbd0cccc746bbf7831 |
|
BLAKE2b-256 | cba09cfdfa72dbfa3476226e0378d274912870a34ed7b0ceae796c5183046921 |