How to copy EXIF data from TIFF/JPG to JPEG2000?

Started by RayeR, March 31, 2014, 06:40:15 AM

Previous topic - Next topic

RayeR

Hi,
due to some JPEG compression artifact that I cannot avoid I'd like to save some of my photos in JPEG2000 format that don't suffer that (color banding in clean blue sky gradient). And I'd like also copy my metadata to new JP2 file. My editor cannot do it so I hope that exiftool is the right way. But I read that JPEG2000 use some different metadata format - XML. Is it possible to convert EXIF data to embedded XML in JPEG2000? I tried something with -TagsFromFile src.jpg -all:all it copied something but I was unable to read information back. Updated JP2 files was a bit larger and in hex/text view I can see some of my EXIF strings but exiftool dest.jp2 reported nothing metadata. I probably need to use other options to convert it to XML, how?
Thx Martin.

Phil Harvey

Hi Martin,

Let me know if you have any questions after reading the ExifTool JPEG2000 tags documentation and trying it out yourself.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

RayeR

#2
I'm not sure if I understand well. Native jpeg2000 tags are not supported to write but there's line
'uuid'    UUID-EXIF --> EXIF Tags 
does it mean that it can contain classic EXIF block? Just copy it?

Here http://www.digikam.org/node/362 is about Linux digiKam that should be able to save metadata in JPEG2000. They say XMP, EXIF, and IPTC formats could be embedded in JPEG2000. So I'd like to copy my EXIF from TIFF/JPEG to JPEG2000 in correct way to be able read them back.

Phil Harvey

You can copy all exif tags to a Jpeg2000 image like this:

exiftool -tagsfromfile SRC.jpg -exif:all DST.jp2

But you should check to see if your other software can read this.  There is no official standard for storing EXIF in Jpeg2000 images.  If you want to stick to official techniques, you should use XMP:

exiftool -tagsfromfile SRC.jpg "-xmp:all<all" DST.jp2

This command copies all information to the same-named tags in XMP (if they exist).

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).