]> git.ipfire.org Git - thirdparty/cups-filters.git/commit
libcupsfilters: Read image resolution from EXIF data of JPEG, PNG, TIFF
authorSachin Thakan <50351794+thakan25@users.noreply.github.com>
Sat, 14 May 2022 07:12:36 +0000 (12:42 +0530)
committerTill Kamppeter <till.kamppeter@gmail.com>
Wed, 24 Aug 2022 11:40:45 +0000 (13:40 +0200)
commit2298d1fa0770737945b9c0dbe1c3dc690033ed3c
treee661c232322665febaf3e6e4e0f523348494fda2
parent7cb5366cd31e85aa1bd842ac31fb3a52242db029
libcupsfilters: Read image resolution from EXIF data of JPEG, PNG, TIFF

If images are printed with "print-scaling=none" one wants to have their original size. To get an original size in absolute dimensions (inches, cm) one needs the pixel count and resolution (dpi, ppi). The resolution is supposed to be in the image's own header but in practice it is often not there.

Images from cameras, and also from some scanners, have additional metadata, the so-called EXIF data which usually contains a resolution. So we read out this with the help of libexif.

In Linux distributions there we usually have libexif and so it is no big effort to let libcupsfilters use it. But it is not required, so for low-resource systems libcupsfilters can be built without (and then not having this feature).

This completes the fix of issue #362

Pull request #466

(cherry picked from commit 76a49f034b6670fe5ff2ef4c6660a8075c460aeb)
Makefile.am
configure.ac
cupsfilters/image-jpeg.c
cupsfilters/image-png.c
cupsfilters/image-private.h
cupsfilters/image-tiff.c
cupsfilters/image.c