Density and jpeg photo shop metadata

25 views
Skip to first unread message

ponroy jonathan

unread,
Dec 14, 2022, 6:35:57 AM12/14/22
to libjpeg-turbo Developer Discussion
Hi all,

i try to use the lib jpeg turbo to read some meta data from the attached file but i have discovered that i can't get x_density and y_density because it is a jpeg produced with Adobe Photoshop.
Contrary to other jpeg files produced by other softwares, when examining the source code where we finished to call function "examine_app0" and get density parameters, with attached file, we call "examine_app14" and don't get the density parameters.

This is valid picture which can be opened with Gimp for example and see the density inside meta data.

Is there a way to get density parameters from this attached file with lib jpeg turbo?

Yhank you for your help
a4_300dpi_2480x3508px.jpg

DRC

unread,
Dec 14, 2022, 12:58:04 PM12/14/22
to libjpeg-t...@googlegroups.com
It appears that Adobe is storing the density information in EXIF tags,
and libjpeg-turbo doesn't inherently support EXIF tags (other than token
support in jpegtran for copying the entire EXIF block from one image to
another or modifying the width/height tags in a transformed image.)

I am not opposed to modifying libjpeg-turbo so that it can parse density
information (or other information, for that matter) from EXIF tags if
the image doesn't have a JFIF marker.  If someone wants to submit a PR
for that, I will review it.

ponroy jonathan

unread,
Dec 15, 2022, 2:45:41 AM12/15/22
to libjpeg-turbo Developer Discussion
Thank you for your answer.

Do you think library Exiv2 (https://exiv2.org) is a good candidate to handle EXIF tags? What is your opinion?

DRC

unread,
Dec 15, 2022, 10:08:28 AM12/15/22
to libjpeg-t...@googlegroups.com
Yes. For licensing reasons, libjpeg-turbo cannot use Exiv2, but that appears to be what GIMP uses.

On Dec 15, 2022, at 1:45 AM, ponroy jonathan <ponr...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "libjpeg-turbo Developer Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to libjpeg-turbo-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/libjpeg-turbo-devel/0b548e3d-3400-46dc-9b93-4b8e8566ed6en%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages