Add photoshop:?resolution to file

Started by Mariano Grau, October 31, 2011, 06:45:13 PM

Previous topic - Next topic

Mariano Grau


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,

Phil Harvey

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

Mariano Grau

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.

Phil Harvey

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

Mariano Grau

Thanks a lot.

This works like i want.

Sorry my insistence. I think very few people would know this.

Phil Harvey

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

cgray

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


Phil Harvey

Hi Chad,

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

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

cgray

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

Phil Harvey

I thought you had this working for writing an existing HasRealMergedData tag here.

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

cgray

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