Releases: lpgonzalez/card-crop
Release list
card-crop 1.1.0
card-crop 1.1.0
Fixed
- Detection no longer mistakes a plain rectangle for a card. In 1.0.0 the
gate looked only at aspect ratio (within 4%) and bounding-box fill, so a
smooth rectangle of roughly ID-1 proportions — a background panel, a soft
shadow — could pass as a card and be cropped. The signal that tells a card
from a rectangle, the rounded corner radius, was already being measured and
then thrown away; it now gates the decision. When the detected shape has no
measurable rounded corner and fills almost the whole selection, the plug-in
now says so ("This looks like the whole selection, not a card.") instead of
cropping it.
Added
- Romanian interface, contributed by Jorge Adrian Saghin Dudulea
(@z4na14) and reviewed by a native speaker
(#1). The other non-English catalogues remain machine-drafted. - Test suite and CI. Fourteen dependency-free detection tests
(python3 -m unittest discover -s tests), and a CI workflow that runs them,
validates the message catalogues (domain-correct.monames, exact msgid
coverage, matching format specifiers) and lints, on every pull request.
Install
Download card-crop-1.1.0.zip (or .tar.gz) below, unpack it, and copy the
card-crop/ folder into your GIMP 3 plug-ins directory. Full steps are in the
bundled INSTALL.txt. Requires GIMP 3.0 or later; no other dependencies.
card-crop 1.0.0 - straighten and crop scanned ID-1 cards in GIMP
card-crop 1.0.0
A GIMP 3 plug-in that detects, straightens and crops scanned ID-1 cards
(credit cards, ID cards, loyalty cards, transit passes: anything ID-1 shaped).
Point it at a scan, and it finds the card even when it sits at an angle,
straightens it, crops to ISO/IEC 7810 ID-1 proportions with correctly rounded
corners, and leaves the background transparent.
Install
Download card-crop-1.0.0.zip (or .tar.gz) below, unpack it, and copy the
card-crop/ folder into your GIMP plug-ins directory:
Linux ~/.config/GIMP/3.0/plug-ins/
Windows %APPDATA%\GIMP\3.0\plug-ins\
macOS ~/Library/Application Support/GIMP/3.0/plug-ins/
On Linux and macOS, make it executable: chmod +x card-crop/card-crop.py.
Restart GIMP; the commands appear under Filters > Card Tools. Full steps
are in the bundled INSTALL.txt.
Requires GIMP 3.0 or later. No other dependencies: no NumPy, no OpenCV. GIMP's
bundled Python is all it needs.
What it does
- Crop card (auto) detects the card inside your selection (or the whole
image), straightens it, and crops it. - Crop card from path is the fallback for hard cases: mark the four corners
by hand and it does the rest.
Detection runs four candidates (brightness and colour, each with two
thresholds) and picks the one that is actually card-shaped, so it copes with
cases that defeat a single method, like a grey card with a coloured band. The
corner radius is measured from the card, not assumed. Failures are explained,
never silent, and success is reported quietly on the status bar.
Languages
The interface is available in English, Spanish, Catalan, Galician, French,
Italian, Brazilian Portuguese, German and Dutch. The non-English catalogues are
machine-drafted and unreviewed; corrections are welcome via an issue.
Notes
This is the first release. It has been tested on real scans and synthetic
cases, always erring toward cropping slightly inward rather than leaving
background behind. If a scan trips it up, opening an issue with the DEBUG log
(create a file named DEBUG next to card-crop.py) is the most useful thing
you can send.