]> 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)
committerGitHub <noreply@github.com>
Sat, 14 May 2022 07:12:36 +0000 (09:12 +0200)
commit76a49f034b6670fe5ff2ef4c6660a8075c460aeb
treeafb8b35954350751ed6f7e12b9e1ab4bdea0f8ee
parent056d2b5cf8ce906c4b92633a05368c6577e4cf42
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
.gitignore
Makefile.am
configure.ac
cupsfilters/image-jpeg.c
cupsfilters/image-png.c
cupsfilters/image-private.h
cupsfilters/image-tiff.c
cupsfilters/image.c