ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: Mariano Grau on October 31, 2011, 06:45:13 PM

Title: Add photoshop:?resolution to file
Post by: Mariano Grau on October 31, 2011, 06:45:13 PM

The next command works fine if tags photoshop:xresolution and photoshop:xresolution exists at file.jpg

exiftool -photoshop:xresolution=200 -photoshop:yresolution=200 file.jpg

However, if file not contain these tags i get:

0 image files updated
1 image files unchanged

How i can add photoshop resolution to a file that not contain these tags or whole photoshop profile?


Regards,
Title: Re: Add photoshop:?resolution to file
Post by: Phil Harvey on November 01, 2011, 07:15:02 AM
There are a few reasons why these tags can't be added individually, but the most compelling reason is that they aren't very useful without other Photoshop information since the standard EXIF or JFIF resolution tags should be used.

- Phil
Title: Re: Add photoshop:?resolution to file
Post by: Mariano Grau on November 02, 2011, 03:50:46 AM
Thanks, Phil

Then, how can i add basic photoshop information to a jpg file?

Perhaps, transfering pthoshop profile from other file with tagsfromfile option as:

exiftool -tagsfromfile photoshop:all template.jpg file.jpg

With the above statement i not get pass photoshop resolution.
Title: Re: Add photoshop:?resolution to file
Post by: Phil Harvey on November 02, 2011, 07:34:25 AM
You're very insistent.  OK, you can copy the resolution information from another file with this command:

exiftool -config ResolutionInfo.config -tagsfromfile SRCFILE -resolutioninfo FILE

Where SRCFILE is the photoshop file containing the resolution information.  When you run this command, the configuration file "ResolutionInfo.config" must be in the current directory (either that, or specify the directory on the command line).  The necessary config file is attached to this post.  Here is what it looks like:

%Image::ExifTool::UserDefined = (
    'Image::ExifTool::Photoshop::Main' => {
        0x03ed => {
            Name => 'ResolutionInfo',
            Writable => 'undef',
        },
    },
);
1; #end


- Phil
Title: Re: Add photoshop:?resolution to file
Post by: Mariano Grau on November 02, 2011, 04:01:10 PM
Thanks a lot.

This works like i want.

Sorry my insistence. I think very few people would know this.
Title: Re: Add photoshop:?resolution to file
Post by: Phil Harvey on November 02, 2011, 06:36:07 PM
Quote from: Mariano Grau on November 02, 2011, 04:01:10 PM
Sorry my insistence.

No need to apologize.  This is just an unusual thing to do, so I wanted to be sure you really wanted to do it. :)

- Phil
Title: Re: Add photoshop:?resolution to file
Post by: cgray on October 15, 2018, 11:50:40 AM
I am interested in doing this also.  Being able to take the photoshop metadata from one file and transfer it to another.

How would i setup the config file for a field that is not writable?

Under "VersionInfo" there is metadata "HasRealMergedData" is the photoshop metadata i would like to transfer that from one file to another.

Thanks!
Chad

Title: Re: Add photoshop:?resolution to file
Post by: Phil Harvey on October 15, 2018, 12:05:39 PM
Hi Chad,

Sorry, but there is no way to create new Photoshop information using ExifTool.  Not even with a user-defined tag.

- Phil
Title: Re: Add photoshop:?resolution to file
Post by: cgray on October 15, 2018, 12:07:19 PM
I tried the following but get these warnings:


exiftool -config MaxCompatInfo.config -m -tagsFromfile hasMaxCompat.jpg -Photoshop:HasRealMergedData doesNotHaveMax.jpg

Warning: Not an integer for Photoshop:HasRealMergedData - hasMaxCompat.jpg
Warning: No writable tags set from hasMaxCompat.jpg
    0 image files updated
    1 image files unchanged



%Image::ExifTool::UserDefined = (
    'Image::ExifTool::Photoshop::VersionInfo' => {
        0x0421 => {
            Name => 'HasRealMergedData',
            Writable => 'undef',
        },
    },
);
1; #end
Title: Re: Add photoshop:?resolution to file
Post by: Phil Harvey on October 15, 2018, 12:12:46 PM
I thought you had this working for writing an existing HasRealMergedData tag here (https://exiftool.org/forum/index.php/topic,9580.msg49668.html#msg49668).

- Phil
Title: Re: Add photoshop:?resolution to file
Post by: cgray on October 15, 2018, 12:19:20 PM
Yes if the metadata is already in the file i can change it.  I have a program that is taking an image and resizing it.  During the resizing process i loose the metadata for HasRealMergedData.  I would like to put it back in the new file.

I guess i cannot create new photoshop metadata for a file that does not have it.

I will see if i can get my program that is resizing the file to retain the photoshop metadata.

Chad