This application is:
-
A simple GTK application to crop JPEG images by selecting a cropping area and saving a copy of the image.
-
Unlike general purpose image manipulation programs it avoids generation loss.
For more information see: FAQ.adoc#why-build-it
Short, non-technical explanation:
Digital images are made up of tiny dots called pixels. These pixels are
arranged in groups. If you cut an image along the lines between these groups,
you can save the image without losing quality. This is because you don’t have
to redo the whole image.
Technical explanation:
It turns out that debian’s jpegtran has a "-crop" flag which performs lossless cropping of jpeg images as long as the crop is to a multiple of what the manpage calls the "iMCU boundary", usually an 8x8 or 16x16 block of pixels. This feature may have been pioneered by Guido of jpegclub.org some years ago.
This application is in development and will eventually be available for Linux on Flathub.
flatpak --user install CropGuiNeu-*-TESTING-*.flatpak
You can manually clone the repository and build it using the SDK.
The Makefile
contains all required instructions to build it yourself.
make
flatpak --user install CropGuiNeu-*-TESTING-*.flatpak
This installation method was previously preferred. If you can’t use Flatpak, like on a Mac, you can still use Pipx/UV and install the dependencies.
First you will need to install the #dependencies for your platform.
Given that you have already installed Python and Pipx you can install the application using pipx like this:
pipx install git+https://github.com/lwbt/CropGuiNeu.git
Currently the script requires the following external progams to be installed:
-
jpegtran
— This program provides the functionality around which the GUI is built.
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install -y libjpeg-turbo-progs
Fedora:
sudo dnf install -y libjpeg-turbo-utils
Arch Linux:
sudo pacman -S libjpeg-turbo
macOS using Homebrew:
brew install libjpeg-turbo