• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

Metadata, excluding from jpegs

Contributor ,
Sep 22, 2022 Sep 22, 2022

Copy link to clipboard

Copied

When I save a copy as jpeg (I do this because I need to enclose a path), i get unwanted metadata in the jpg file - Camera Raw data and also Edit historie (see the attached dump, please).

Does anyone know how to avoid this?
I also used to be able to quickly replace metadata on multiple files with my own template in Bridge by choosing Tools, Replace metadata, but now I have to select each file, choose File Info and Replace template with... That is very time consuming...

Thanks in advance ☺

TOPICS
Windows

Views

118

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Sep 23, 2022 Sep 23, 2022

The change in forum software broke some script code posted before the forum software was updated. Try this:

 

// https://forums.adobe.com/message/9758205#9758205
#target bridge
if( BridgeTalk.appName == "bridge" ) {
remCRS = new MenuElement("command", "Remove Camera Raw Metadata",  "at the end of Tools");
}
remCRS.onSelect = function () {
if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
var sels = app.document.selections;
f
...

Likes

Translate

Translate
Guide ,
Sep 22, 2022 Sep 22, 2022

Copy link to clipboard

Copied

use Save for Web.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 22, 2022 Sep 22, 2022

Copy link to clipboard

Copied

I do that, when I don't need to include a path...

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 22, 2022 Sep 22, 2022

Copy link to clipboard

Copied

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 23, 2022 Sep 23, 2022

Copy link to clipboard

Copied

Thank you - I saw the first one before posting, but to me it looked very difficult. I'm not a programmer, and all I want is a straight forward solution like a button "Press here to remove unwanted metadata from all your files before sending them to your clients" 😉

 

Also the solutions where a new file is made, are not for me as my clipping path is not included in the new file.
I would settle for the function of replacing with my own template, if only I could do it on multiple files, as I used to do not so long ago, but when I do this now, nothing is happening.

I tried with a batch action, but that doesn't work either.

 

The "Edit History" is the worst, because here anyone can se my local file paths with folder names and everything.

 

 

 

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 23, 2022 Sep 23, 2022

Copy link to clipboard

Copied

@shasimo – it just looks harder than it is as you are unfamiliar with the process. All you need to do is copy/paste the code, not write it yourself!

 

  1. Copy the code text to the clipboard
  2. Open a new blank file in a plain-text editor (not in a word processor)
  3. Paste the code in
  4. Save the text file as .txt
  5. Rename the file extension from .txt to .jsx
  6. Install or browse to the .jsx file to run (see below)

 

If these simple instructions are too abbreviated, you may need to read on...

 

https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 23, 2022 Sep 23, 2022

Copy link to clipboard

Copied

Thank you - I will try later today, and let you know how it goes.
Is it the script from here https://community.adobe.com/t5/bridge-discussions/delete-metadata/m-p/11136141#M19012 I should use?
I will read the guide on how to.

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 23, 2022 Sep 23, 2022

Copy link to clipboard

Copied

@shasimo – It's up to you.

 

If you like a Photoshop-based workflow, then the script from SuperMerlin should suffice:

 

https://community.adobe.com/t5/photoshop-ecosystem-discussions/script-to-remove-all-meta-data-from-t...

 

// https://forums.adobe.com/thread/2604316
// https://forums.adobe.com/message/10978749#10978749
#target photoshop
removeXMP();

function removeXMP() {
    if (!documents.length) return;
    if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
    var xmp = new XMPMeta(activeDocument.xmpMetadata.rawData);
    XMPUtils.removeProperties(xmp, "", "", XMPConst.REMOVE_ALL_PROPERTIES);
    app.activeDocument.xmpMetadata.rawData = xmp.serialize();
} 

 

If you prefer a Bridge workflow, then either of these two should do the job:

 

https://community.adobe.com/t5/bridge-discussions/delete-metadata/m-p/2888521#U11136141

 

https://community.adobe.com/t5/bridge-discussions/delete-metadata/m-p/2888521#U11136148

 

Keep in mind that Bridge and Photoshop both install and run scripts differently.

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 23, 2022 Sep 23, 2022

Copy link to clipboard

Copied

Okay, not so hard ☺
I have now tried to use this code: https://community.adobe.com/t5/photoshop-ecosystem-discussions/hide-camera-raw-settings-in-jpeg-meta...

I put it in a txt file, renamed it to remCRS.jsx, put it in the Bridge startup script folder, restarted Bridge, said yes to the script prompt and it's now showing up in the tools menu, but nothing happens when I run it (choosing a file and pressing the menuitem Remove camera raw metadata.

I wonder what is wrong?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 23, 2022 Sep 23, 2022

Copy link to clipboard

Copied

The change in forum software broke some script code posted before the forum software was updated. Try this:

 

// https://forums.adobe.com/message/9758205#9758205
#target bridge
if( BridgeTalk.appName == "bridge" ) {
remCRS = new MenuElement("command", "Remove Camera Raw Metadata",  "at the end of Tools");
}
remCRS.onSelect = function () {
if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
var sels = app.document.selections;
for (var a in sels){
var thumb = new  Thumbnail(app.document.selections[a]);
var md = thumb.synchronousMetadata;
var xmp = new XMPMeta(md.serialize());
        if(thumb.hasMetadata){
         XMPUtils.removeProperties(xmp, XMPConst.NS_CAMERA_RAW, "", XMPConst.REMOVE_ALL_PROPERTIES);
        var updatedPacket = xmp.serialize(XMPConst.SERIALIZE_OMIT_PACKET_WRAPPER | XMPConst.SERIALIZE_USE_COMPACT_FORMAT);
        thumb.metadata = new Metadata(updatedPacket);
        }
    }
};

 

I have updated the code in that old topic too.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 23, 2022 Sep 23, 2022

Copy link to clipboard

Copied

Perfect - this worked - thanks!! But only with one file at a time - is it possible to select all files in a folder and run the command? Edit: Sorry - this is not the case - it DOES work on multible files ☺
Do you also know how to remove the "Edit history" data?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 23, 2022 Sep 23, 2022

Copy link to clipboard

Copied

quoteDo you also know how to remove the "Edit history" data?
By @shasimo

 

Have you looked at one of the scripts to remove ALL XMP metadata?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 23, 2022 Sep 23, 2022

Copy link to clipboard

Copied

Yes, and no, because I still want to export my camera data and copyright.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 23, 2022 Sep 23, 2022

Copy link to clipboard

Copied

OK, I'll give it a look...

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 23, 2022 Sep 23, 2022

Copy link to clipboard

Copied

I made one with a remove-ALL-script, and it definately does that when I check out the result in Bridge - it's fine and okay like this.
However, if  I use a service like http://www.imageforensic.org - part of the information is still there. Maybe it's from the camera it self. See the attached files. Just thought I should inform about this ☺

Thanks a lot for your help!

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 23, 2022 Sep 23, 2022

Copy link to clipboard

Copied

OK, try this revised code:

 

/*
Remove PsHistory Metadata.jsx
https://community.adobe.com/t5/photoshop-ecosystem-discussions/metadata-excluding-from-jpegs/m-p/13219060

photoshop: => http://ns.adobe.com/photoshop/1.0/
XMPConst.NS_PHOTOSHOP

Based on:
https://community.adobe.com/t5/photoshop-ecosystem-discussions/hide-camera-raw-settings-in-jpeg-metadata/m-p/10306319
*/

#target bridge

if (BridgeTalk.appName == "bridge") {
    removePsHistory = new MenuElement("command", "Remove Photoshop:History Metadata", "at the end of Tools");
}
removePsHistory.onSelect = function () {
    if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
    var sels = app.document.selections;
    for (var a in sels) {
        var thumb = new Thumbnail(app.document.selections[a]);
        var md = thumb.synchronousMetadata;
        var xmp = new XMPMeta(md.serialize());
        if (thumb.hasMetadata) {
            XMPUtils.removeProperties(xmp, XMPConst.NS_PHOTOSHOP, "History", XMPConst.REMOVE_ALL_PROPERTIES);
            var updatedPacket = xmp.serialize(XMPConst.SERIALIZE_OMIT_PACKET_WRAPPER | XMPConst.SERIALIZE_USE_COMPACT_FORMAT);
            thumb.metadata = new Metadata(updatedPacket);
        }
    }
};

 

The original code removed the incorrect xmpMM:History rather than photoshop:History metadata

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 23, 2022 Sep 23, 2022

Copy link to clipboard

Copied

LATEST

This one is working and removing the Photoshop history which includes my locale file paths etc.
Thanks a lot for making this for me and for all your help 😄

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines