[gdal-dev] lossless jpeg crop in gdal?
Matt.Wilkie at yukon.ca
Matt.Wilkie at yukon.ca
Tue Mar 16 13:45:43 PDT 2021
I recently learned that jpegtran from the JPEG library has the ability to crop and save a new jpeg losslessly:
These transformations are each completely lossless and reversible. The transformations on the image data comprise:
· eliminate non-standard application-specific data inserted by some image programs,
· perform certain transformations on a file, such as:
o discarding of colour channels (conversion to greyscale),
o rotating and flipping in steps of 90 degrees,
o cropping at image block borders (every 8×8 or 16×16 pixels),
o rescaling.[7]<https://en.wikipedia.org/wiki/Libjpeg#cite_note-jpegtran-7>
These are lossless and reversible only regarding the image data that is kept. Reencoding with repeated lossy quantisation of the image data (generation loss) does not take place.
-- https://en.wikipedia.org/wiki/Libjpeg#jpegtran
Can GDAL take advantage of this for jpeg-in-geotiff images?
Matt Wilkie
Geomatics Analyst
Environment | Technology, Innovation and Mapping
T 867-667-8133 | Yukon.ca<http://yukon.ca/>
Hours: 08:30-16:30, Tue-Wed: Office, Thu-Fri: Remote.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210316/832e684b/attachment.html>
More information about the gdal-dev
mailing list