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

delete history log in metadata

Explorer ,
Feb 19, 2023 Feb 19, 2023

By mistake, I had my preferences set to record a history log in metadata.  I want to share the photo but without the recipient being able to see the changes I've made.  Is there a way to delete or clear the history log?  Or to send the photo without that information?  (It needs to be a good version of the image, so something like a screenshot won't work.)   (I'm using PS CS6 in windows).  Any help would be appreciated.  

TOPICS
Windows
6.4K
Translate
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 , Feb 19, 2023 Feb 19, 2023

If you don't have any other requirements for retaining metadata, you can use Export As or Export Save for Web (Legacy) which both strip metadata or offer options for retaining limited metadata for JPEG and PNG.

 

Another option is to select all layers, then use the Layer menu > Duplicate command to dupe the layers to a new file, which will not include document metadata, which is more useful if you need to share say a layered PSD.

 

Other options would be a custom script for Photoshop, Bridge or

...
Translate
Adobe
Community Expert ,
Feb 19, 2023 Feb 19, 2023

If you don't have any other requirements for retaining metadata, you can use Export As or Export Save for Web (Legacy) which both strip metadata or offer options for retaining limited metadata for JPEG and PNG.

 

Another option is to select all layers, then use the Layer menu > Duplicate command to dupe the layers to a new file, which will not include document metadata, which is more useful if you need to share say a layered PSD.

 

Other options would be a custom script for Photoshop, Bridge or using 3rd party software such as ExifTool.

 

A generic XMP metadata removal option is part of the following script (not specifically history):

 

https://community.adobe.com/t5/photoshop-ecosystem-discussions/free-script-remove-selected/m-p/10104...

 

Translate
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
Explorer ,
Feb 20, 2023 Feb 20, 2023

Thanks very much for all the suggestions.  Using the layers menu trick worked and deleted all the metadata.  I've also downloaded the exiftool and tried that and it looks like that will delete the history log and leave some camera info so that should be helpful.  I tried to use Export As but for some reason the only options that show there are Paths to Illustrator and Zoomify -- I'm not sure what those are but when I tested them they unfortunately  didn't seem to be usable.  Thanks again for the help.

Translate
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 ,
Feb 20, 2023 Feb 20, 2023
quote

I've also downloaded the exiftool and tried that and it looks like that will delete the history log and leave some camera info so that should be helpful.


By @laris99

 

The three scripts that I posted will do similar to ExifTool, only removing the History Log metadata.

 

For the sake of completeness, the ExifTool command would be similar to:

 

exiftool -XMP-photoshop:History= "C:\Path to\File.jpg"
Translate
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 ,
Feb 20, 2023 Feb 20, 2023
quote

I tried to use Export As but for some reason the only options that show there are Paths to Illustrator and Zoomify -- I'm not sure what those are but when I tested them they unfortunately  didn't seem to be usable.  Thanks again for the help.


By @laris99

 

What version of Photoshop are you using?

 

You should see something like this:

 

export.png

Translate
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
Explorer ,
Feb 21, 2023 Feb 21, 2023

I only have PS CS6.  This is what I see.

Export options2.png

Translate
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 ,
Feb 21, 2023 Feb 21, 2023

Ah, but you still have Save for Web if needed in CS6.

Translate
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
Explorer ,
Feb 21, 2023 Feb 21, 2023
quote

Ah, but you still have Save for Web if needed in CS6.


By @Stephen Marsh

 

yes I do, and that works too.  Should have mentioned that before, sorry!  Thanks again for the help.  

Translate
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 ,
Jul 13, 2024 Jul 13, 2024

@laris99 

 

Save for Web wasn't "legacy" yet in CS6! 😊 I don't remember when it became legacy, though. @Stephen Marsh do you remember?

 

Jane

 

Translate
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 ,
Jul 13, 2024 Jul 13, 2024
LATEST

@jane-e - I can't recall when (Legacy) was added, some time after Export As was introduced.

Translate
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 ,
Feb 19, 2023 Feb 19, 2023

Here is an example of a Script that would remove Photoshop History Log metadata from an open document:

 

// Remove Photoshop History Log Metadata from Open Doc.jsx

#target photoshop

removeHistoryLogMeta();

function removeHistoryLogMeta() {
    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.NS_PHOTOSHOP, "History", XMPConst.REMOVE_ALL_PROPERTIES);
    app.activeDocument.xmpMetadata.rawData = xmp.serialize();
} 

 

 

Depending on workflow requirements, a script that processed a folder of files, or a version for Adobe Bridge script may be preferred.

 

EDIT: Here is one for a folder of supported file formats, you can add/remove file extensions as required from the code:

 

// Remove Photoshop History Log Metadata from Folder of Files.jsx

#target photoshop;  

var inputFolder= Folder.selectDialog ("Please select folder to process");  
if(inputFolder != null){  
var fileList  = inputFolder.getFiles(/\.(jpg|jpeg|tif|tiff|psd|png)$/i);  
for(var a in fileList){removeHistoryLogMeta(fileList[a]);}  
}  
function removeHistoryLogMeta(selectedFile) {          
if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");       
var xmpFile = new XMPFile( selectedFile.fsName, XMPConst.FILE_UNKNOWN, XMPConst.OPEN_FOR_UPDATE | XMPConst.OPEN_USE_SMART_HANDLER );   
var xmp = xmpFile.getXMP();  
xmp.deleteProperty(XMPConst.NS_PHOTOSHOP, "History");  
if (xmpFile.canPutXMP(xmp)) {   
        xmpFile.putXMP(xmp);  
         xmpFile.closeFile(XMPConst.CLOSE_UPDATE_SAFELY);   
         }                
};    

 

EDIT 2:

Here is one for selected files in Adobe Bridge (look in the Tools menu once installed):

 

/*
Remove Photoshop History Log Metadata from Adobe Bridge.jsx
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") {
    removeHistoryLogMeta = new MenuElement("command", "Remove Photoshop History Log Metadata", "at the end of Tools");
}
removeHistoryLogMeta.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);
        }
    }
};

 

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

Translate
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
Explorer ,
Feb 20, 2023 Feb 20, 2023

Thanks very much for this.  Unfortunately I couldn't figure out how to install a script (still pretty much a newbie) but I'll keep this info if I figure it out!

Translate
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 ,
Feb 20, 2023 Feb 20, 2023
quote

Thanks very much for this.  Unfortunately I couldn't figure out how to install a script (still pretty much a newbie) but I'll keep this info if I figure it out!


By @laris99


I provided a link to my blog with full instructions. Please do try again when you have time.

 

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

Translate
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
Explorer ,
Feb 21, 2023 Feb 21, 2023
Thanks very much. Will do!
Translate
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
New Here ,
May 31, 2024 May 31, 2024

Hi! I tried to follow all of the steps from your blog for Bridge, but there is no script anywhere in Bridge. I don't know much and I 'm just trying to be able to remove all edit history from my files. Thanks for any help!

Translate
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 ,
May 31, 2024 May 31, 2024

@Luxseniors wrote:

Hi! I tried to follow all of the steps from your blog for Bridge, but there is no script anywhere in Bridge. I don't know much and I 'm just trying to be able to remove all edit history from my files. Thanks for any help!


 

In this example, the script named "Clear History from Metadata.jsx" was saved as a plain-text file (not rich-text) in the Startup Scripts folder:

 

2024-06-01_09-28-16.png

 

After restarting Bridge, you should receive a message that a new script has been installed and do you wish to enable the script. I'm not seeing this in Bridge 2024, however, going into preferences I can see that the script is installed and active:

 

2024-06-01_09-26-28.png

 

Then select the images and go to the Tools menu:

 

2024-06-01_09-26-05.png

Translate
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 Beginner ,
Jul 12, 2024 Jul 12, 2024

HI  Stephen,

I'm not familiar on writing scripts.  I am interested in obtaining the script you wrote for Remove Photoshop History Log Metadata from Adobe Bridge.jsx.  Could you please email the completed .jsx file for MAC OS? 

 

Thanks,

 

Jim Di Loreto

Smithsonian Photographer

Washington, DC USA

Translate
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 ,
Jul 12, 2024 Jul 12, 2024

@Jimmy_D_Photo 

 

Just copy and paste the code into a plain text file using the instructions provided in this topic at my blogpost for saving and installing scripts in Adobe apps. It's all in this topic discussion.

Translate
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 Beginner ,
Jul 12, 2024 Jul 12, 2024

Stephen,

 

Still does not work for me.  Gov't issued computers limit what we can do.  If you can email the file, Remove Photoshop History Log Metadata from Adobe Bridge.jsx. that will be the best option for me. 

 

 

[email link removed as per forum guidelines]

 

 

Translate
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 ,
Jul 12, 2024 Jul 12, 2024
quote

Stephen,

 

Still does not work for me.  Gov't issued computers limit what we can do. 


By @Jimmy_D_Photo

 

Surely you can:

 

  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 as a plain text format file – .txt
  5. Rename the saved file extension from .txt to .jsx
  6. Install or browse to the .jsx file to run (see below)

 

?

Translate
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 Beginner ,
Jul 13, 2024 Jul 13, 2024

 @Stephen Marsh attached are the steps I did using Apple Text Edit app.  There is no option to save as a .txt, so I saved as .rtf and renamed to .jsx.

Translate
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 Beginner ,
Jul 13, 2024 Jul 13, 2024

@Stephen MarshMicrosoft Word allows to save .txt.  Did that and same steps to remaune and install in scrips folder.  Still does not work.

Translate
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 ,
Jul 13, 2024 Jul 13, 2024

@Jimmy_D_Photo 

 

Use TextEdit and either convert to plain text for one time use or change your Preferences / Settings, as I do. 
Details here from Apple Support:

Change the document format

You can change the format of your document. Plain text (.txt) doesn’t allow formatting. Rich text (.rtf) allows formatting, tables, and images. When you change a rich text document to plain text, the document loses all text styles and formatting options.

  • In the TextEdit app on your Mac, choose Format > Make Plain Text or Format > Make Rich Text.

  • If there’s a format you prefer for new documents, you can set the default format. Choose TextEdit > Settings, click New Document, then select “Rich text” or “Plain text” below Format.

https://support.apple.com/guide/textedit/open-documents-txte51413d09/1.19/mac/14.0

 

Jane

 

Translate
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 Beginner ,
Jul 13, 2024 Jul 13, 2024

@jane-eI got it to work.  thanks.

Translate
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 ,
Jul 13, 2024 Jul 13, 2024

Thanks for letting us know @Jimmy_D_Photo , and I'm glad TextEdit is working for you now!

 

Jane

 

Translate
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