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 installation method is currently preferred.
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
This application is in development and will eventually be available on Flathub. Until then, you must manually clone the repository and build it using the SDK.
flatpak --user install \
org.gnome.Platform/x86_64/46
org.gnome.Sdk/x86_64/46 \
flatpak-builder \
--force-clean build-dir "io.github.lwbt.CropGuiNeu.yaml"
flatpak-builder \
--user \
--install \
--force-clean build-dir "io.github.lwbt.CropGuiNeu.yaml"