Skip to main content
Inspiring
January 25, 2020
Question

How to apply XMP while saving an image as tiff in javascript

  • January 25, 2020
  • 2 replies
  • 733 views

I like to mimick in javascript the way Camera RAW applies a XMP profile before saving the image as TIFF.

 

PS workflow:

- open CR2

- Camera RAW window pops up

- Profile -> Browse and select your XMP profile (apply)

- Save Image...

 

Any help is highly appreciated. Thx. 

This topic has been closed for replies.

2 replies

Stephen Marsh
Community Expert
Community Expert
January 26, 2020

OK, I have been playing around and it is possible to apply CRS metadata via Photoshop scripting, I have tested with exposure, white balance and vibrance.

 

Now I understand what you mean by "Profile".

 

The Camera Raw XMP metadata for using a "Profile" appears to be a little more complex, however, as this is just metadata I'm guessing that it is possible if it is supported (yet to be tested).

 

osterburgAuthor
Inspiring
January 26, 2020

Thank you. I looked into exiftool but run into a "bug" (issue). My current workaround is to have the XMP file along side to Camera RAW images. PS takes care of the rest when you load in the CR2 image to convert to TIFF.

Stephen Marsh
Community Expert
Community Expert
January 26, 2020

If I am understanding you correctly, you would like a way to script adding the Camera Raw develop settings metadata to TIFF images? By profile, do you mean "Presets" (the second tab from the right)?

 

I have not tested, so this is just conjecture... All of the ACR develop settings are just metadata, so in theory it will be a question of adding some/all of the required metadata to the file.

 

 

 

<crs:Version>12.1</crs:Version>
<crs:ProcessVersion>10.0</crs:ProcessVersion>
<crs:WhiteBalance>As Shot</crs:WhiteBalance>
<crs:Temperature>4950</crs:Temperature>
<crs:Tint>+3</crs:Tint>
<crs:Saturation>0</crs:Saturation>
<crs:Sharpness>0</crs:Sharpness>
<crs:LuminanceSmoothing>0</crs:LuminanceSmoothing>
<crs:ColorNoiseReduction>0</crs:ColorNoiseReduction>
<crs:VignetteAmount>0</crs:VignetteAmount>
<crs:ShadowTint>0</crs:ShadowTint>

...

<crs:HasSettings>True</crs:HasSettings>
<crs:HasCrop>False</crs:HasCrop>
<crs:AlreadyApplied>True</crs:AlreadyApplied>

 

 

 

This may be achievable via Photoshop or Bridge scripting if it is possible to write the CRS metadata, however, I personally would look into ExifTool as that would be faster for me.

 

P.S. I forgot to add, that the file would then have to be opened or processed through ACR in order for the metadata develop instructions to be applied and then saved to the file.