ExifTool Forum

General => Metadata => Topic started by: mowaca on February 07, 2013, 05:24:08 PM

Title: Recreating XMP-tiff metadata for JP2000
Post by: mowaca on February 07, 2013, 05:24:08 PM
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

Title: Re: Recreating XMP-tiff metadata for JP2000
Post by: Phil Harvey on February 07, 2013, 08:07:21 PM
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
Title: Re: Recreating XMP-tiff metadata for JP2000
Post by: mowaca on February 08, 2013, 10:30:04 AM
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
Title: Re: Recreating XMP-tiff metadata for JP2000
Post by: Phil Harvey on February 08, 2013, 10:44:57 AM
It sounds like you want to copy FileName to XMP-dc:source:

-XMP-dc:Source<FileName

- Phil