Recreating XMP-tiff metadata for JP2000

Started by mowaca, February 07, 2013, 05:24:08 PM

Previous topic - Next topic

mowaca

We have a new requirement for JP2000 files that we need to have XMP (specifically XMP-dc:source and -XMP-tiff:all) in the jp2 files. Since this is a new requirement all our old files do not have any XMP, nor did we end up keeping the TIF masters so we can't just do a -tagsFromFile. Its basically the same information as the JP2000 so I probably could brute force copy over the information.
e.g copy values like: 
<Jpeg2000:ImageHeight>4584</Jpeg2000:ImageHeight>
<Jpeg2000:ImageWidth>6976</Jpeg2000:ImageWidth>
to
<XMP-tiff:ImageHeight>4584</XMP-tiff:ImageHeight>
<XMP-tiff:ImageWidth>6976</XMP-tiff:ImageWidth>

I thought I also could just use this approach to create a sidecar file since the name, date, image size and dimensions are the only things that change in a given batch.

However, I thought before I go down this road I would ask if I could accomplish easily with a line or two of exiftool commands? 

Thanks,
Kirk


Phil Harvey

Hi Kirk,

I really don't know what metadata you want to transfer, but yes, you can easily automate this with ExifTool once you figure out what you want to do.  The thing to do is to create a .arg file and use the -@ option to keep the command line simpler.  See the .args files included with the full distrubution for examples.

- 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 ($).

mowaca

#2
I think I got it working after a few tries. Can you use the variables for filename/directory/extension (%f, %e, etc.)? That didn't work for me.

-XMP-tiff:Artist=(Artist Name)
-XMP-tiff:BitsPerSample=8, 8, 8
-XMP-tiff:Orientation=Horizontal (normal)
-XMP-tiff:PhotometricInterpretation=RGB
-XMP-tiff:ResolutionUnit=inches
-XMP-tiff:SamplesPerPixel=3
-XMP-tiff:XResolution=300
-XMP-tiff:YResolution=300
-XMP-tiff:ImageWidth<Jpeg2000:ImageWidth
-XMP-tiff:Compression<Jpeg2000:Compression
-XMP-tiff:ImageHeight<Jpeg2000:ImageHeight
-XMP-tiff:DateTime<System:FileModifyDate
-XMP-tiff:Make=(Make value)
-XMP-tiff:Model=(Model value)
-XMP-dc:Source<System:FileName

Phil Harvey

It sounds like you want to copy FileName to XMP-dc:source:

-XMP-dc:Source<FileName

- 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 ($).