exiftool -tagsfromfile 1.dcm 1.jpg

Started by Archive, May 12, 2010, 08:53:55 AM

Previous topic - Next topic

Archive

[Originally posted by linuxuser on 2006-07-20 20:33:46-07]

exiftool -tagsfromfile 1.dcm 1.jpg
File '1.dcm' does not exist for -TagsFromFile option

Does this mean it is not supported to copy the tags from the dcm-file to the jpg-file?

Archive

[Originally posted by exiftool on 2006-07-21 11:42:12-07]

Copying tags from DCM to JPEG is supported (although I don't think there are many DCM tags which have the same name as tags that can be written to a JPEG image).

The message you are getting indicates that the file "1.dcm" does not exist.  Perhaps it is in some other directory?

- Phil

Archive

[Originally posted by linuxuser on 2006-07-21 13:35:41-07]

Please try: exiftool -G -H 1.dcm / convert 1.dcm 1.png / exiftool -G -H 1.png - you will find a lot tags with personal info / convert 1.dcm 1.jpg - exiftool -G -H 1.jpg don't show the info which is shown with the png or the dcm file. As a next step do exiftool -tagsfromfile 1.dcm 1.jpg and you still don't see the info which is shown with the dcm or the png file.

Archive

[Originally posted by exiftool on 2006-07-21 15:12:05-07]

Right.  This is what I said.  There aren't many DCM tags which are valid in a JPEG image.  If you really want to do this, I suggest adding a user-defined XMP namespace defining the tags you want to copy.  XMP is the only format which can be written to a JPEG image that supports arbitrary tag names.

The PNG format supports arbitrary tag names, and this is why 'convert' can write the information to the PNG.  However, you will still have to add user-defined PNG tags to write these using ExifTool since ExifTool currently only defines documented and common PNG tags.

Archive

[Originally posted by linuxuser on 2006-07-21 19:19:41-07]

I would like to have all info of the dcm-file in the jpg-file. Can you give me a syntax example please, how I could do this?

Archive

[Originally posted by exiftool on 2006-07-21 19:40:22-07]

I should warn you, this will be a LOT of work since there are 2000 or so DICOM tags
that you will need to add.  Possibly you can trim this down to only define tags which
you find in your images.

Everything you need to learn how to do this is already included with the ExifTool distribution.
Look at https://exiftool.org/config.html" target="_blank">ExifTool_config
for details.  Read the comments in this file.  You will have to define your own namespace for the
new XMP tags; "DICOM" makes some sense.  So just replace "xxx" with "DICOM" throughout this
file and add all your new tags in the same way as the example tags.

- Phil