This software is a small patch to the Independent JPEG Group's JPEG software to enable lossless cropping of JPEG images.
Of course, cropping is never lossless as the region cropped is thrown away; however, jpegcrop ensures that the region of the image you keep is identical to that same region in the original.
The IJG's jpeglib includes a utility called jpegtran
for doing lossless transformations on JPEG images.
It is this utility that is patched to include the cropping functionality.
The patch file modifies the files jpegtran.c
,
transupp.h
, and transupp.c
. The output of
jpegtran -h
is modifed to document the new behaviour. The
man page for jpegtran
is not modified. Someone feel free to
update the man page.
Files available for download include: