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

delete metadata

Guest
Aug 26, 2010 Aug 26, 2010

Copy link to clipboard

Copied

Is there a way yet to save a picture without metadata?

If not, why not?

TOPICS
How to , Metadata

Views

37.6K

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
People's Champ ,
Aug 26, 2010 Aug 26, 2010

Copy link to clipboard

Copied

Is there a way yet to save a picture without metadata?

In Safe for Web you can choose to excluded all metadata and there seem to be

scripts that can strip the metadata of files, if you have only a few you can

copy past the file to a new one and that strips also all metadata (open a

file, cmda / Cmdc / cmd n/ cmdv and flatten the new file to one layer.)

If not, why not?

In general metadata are very useful for various reasons and other

applications can benefit from metadata also.

Not many people have the need for such a method hence such a feature will

not be implemented until many user request for it

Votes

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
Valorous Hero ,
Aug 26, 2010 Aug 26, 2010

Copy link to clipboard

Copied

It's possible to remove all the metadata in bridge using a script, this should work on most file types except some raw files.

Using ExtendScript Toolkit copy and paste the code into a new window, start Bridge - Edit - Preferences - Startup Scripts, click the "Reveal" button. This will open the folder that the script should be placed. Once that has been done close and restart Bridge and accept the new script.

To use select the documents in Bridge then "Mouse Control/Click menu" select "Remove XMP data"


#target bridge  
if( BridgeTalk.appName == "bridge" ) { 
removeXMPDAT = new MenuElement("command", "Remove XMP data", "at the end of Thumbnail");
}
removeXMPDAT.onSelect = function () {
   removeXMPData();
   }
function removeXMPData(){
if( xmpLib == undefined ) {
  if( Folder.fs == "Windows" ){
   var pathToLib = Folder.startup.fsName + "/AdobeXMPScript.dll";
  } else {
   var pathToLib = Folder.startup.fsName + "/AdobeXMPScript.framework";
  }
  var libfile = new File( pathToLib );
  var xmpLib = new ExternalObject("lib:" + pathToLib );
}
var sels = app.document.selections;
for (var a in sels){
var thumb = app.document.selections;
  var md = thumb.synchronousMetadata; 
  var xmp = new XMPMeta(md.serialize());
        try{
        ...




Votes

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
Guest
Aug 26, 2010 Aug 26, 2010

Copy link to clipboard

Copied

Wow Paul; you are helpful.  Thanks

and in answer to the other note: I cannot possibly see why when people distribute files, for print for example, they would want to distribute personal data, like camera serial number to strangers.

Votes

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
People's Champ ,
Aug 26, 2010 Aug 26, 2010

Copy link to clipboard

Copied

I cannot possibly see why when people distribute files, for print for example,

they would want to distribute personal data, like camera serial number to

strangers.

To speak personally I really have no problem with that whatsoever, and also

as a professional photographer I have no problem that my clients can see the

other information also. There is nothing I wish to hide and there will be

very less clients that will look in to that information, they probably don't

even know it is there...

And stripping metadata from files while distributing means also stripping

copyright info and IPTC for description etc. That really sounds as horror to

me!!

But as said, that is personal, and the metadata with e.g. serial number

gives me the opportunity to filter all files taken with that camera in a

very easy way.

I often have stated: so many photographers so many workflows. But makes it

very hard for any vendor to fulfill all the wishes there are for

applications.

Votes

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
Guest
Aug 26, 2010 Aug 26, 2010

Copy link to clipboard

Copied

Hi,

I see your point. Maybe I am (and have been) being foolish.

Thanks

Votes

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
People's Champ ,
Aug 27, 2010 Aug 27, 2010

Copy link to clipboard

Copied

Maybe I am (and have been) being foolish.

Don't know, let's call it: just different...

Votes

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
Participant ,
Feb 26, 2012 Feb 26, 2012

Copy link to clipboard

Copied

Thanks a lot for the script! Regards, Tuomas

Votes

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
Explorer ,
May 15, 2020 May 15, 2020

Copy link to clipboard

Copied

Hi Paul,

 

Hello from 2020! I've followed your steps to a T, but Bridge is telling me that something is wrong with the script file. Do I copy every single line of text in what you pasted? Including the ellipses at the end? 

 

Once that's done successfully, what does the "Mouse Control/Click menu" mean exactly? Right-click and look in the menu that pops up? 

 

I hope you're well all these years later. 

 

Thank you,

 

Kelsey

Votes

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 ,
May 16, 2020 May 16, 2020

Copy link to clipboard

Copied

// https://forums.adobe.com/thread/708537
#target bridge     
if( BridgeTalk.appName == "bridge" ) {    
removeXMPDAT = new MenuElement("command", "Remove XMP data", "at the end of Thumbnail");  
}  
removeXMPDAT.onSelect = function () {   
   removeXMPData();  
   }  
function removeXMPData(){  
if( xmpLib == undefined ) {  
  if( Folder.fs == "Windows" ){  
   var pathToLib = Folder.startup.fsName + "/AdobeXMPScript.dll";  
  } else {  
   var pathToLib = Folder.startup.fsName + "/AdobeXMPScript.framework";  
  }  
  var libfile = new File( pathToLib );  
  var xmpLib = new ExternalObject("lib:" + pathToLib );  
 }  
var sels = app.document.selections;  
for (var a in sels){  
var thumb = app.document.selections[a];  
  var md = thumb.synchronousMetadata;    
  var xmp = new XMPMeta(md.serialize());  
        try{  
        XMPUtils.removeProperties(xmp, "", "", XMPConst.REMOVE_ALL_PROPERTIES);  
        var updatedPacket = xmp.serialize(XMPConst.SERIALIZE_OMIT_PACKET_WRAPPER | XMPConst.SERIALIZE_USE_COMPACT_FORMAT);  
        thumb.metadata = new Metadata(updatedPacket);  
         }catch(e){alert(e);}  
    }  
}  

Votes

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 ,
May 16, 2020 May 16, 2020

Copy link to clipboard

Copied

// https://forums.adobe.com/message/8934040#8934040
#target bridge
if (BridgeTalk.appName == "bridge"){
var removeXMPData = MenuElement.create( "command", "Remove XMP data", "at the end of Tools");
}
removeXMPData.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());
try{
XMPUtils.removeProperties(xmp, "", "", XMPConst.REMOVE_ALL_PROPERTIES);
var updatedPacket = xmp.serialize(XMPConst.SERIALIZE_OMIT_PACKET_WRAPPER | XMPConst.SERIALIZE_USE_COMPACT_FORMAT);
thumb.metadata = new Metadata(updatedPacket);
}catch(e){alert(e);}
}
};

Votes

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 ,
May 16, 2020 May 16, 2020

Copy link to clipboard

Copied

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

 

I tested the previous two scripts in Bridge 2020 and they both still work. The first script appears in the contextual menu (right-click) while the second script appears in the main Tools menu.

 

Keep in mind that there are other metadata types in files which are not XMP based so may remain after running these scripts.

Votes

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
Explorer ,
Jun 21, 2021 Jun 21, 2021

Copy link to clipboard

Copied

Thanks!  I used the second script to delete all the metadata, then I imported the correct metadata in from a similar image.  Then I tried adding more keywords to the file and it did not go black as before.  So this fixed the problem.  I had never ran a script before.  Thanks for the documentation on how to do that, and for the fix!

Janet

Votes

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 ,
Jun 21, 2021 Jun 21, 2021

Copy link to clipboard

Copied

LATEST

 

I'm happy that you're all good now!

 

Votes

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 ,
Oct 31, 2019 Oct 31, 2019

Copy link to clipboard

Copied

I stumbled over this old post, so just in case somebody else is asking the same... The following script is for Photoshop, not Bridge.

 

https://community.adobe.com/t5/Photoshop/Script-to-remove-all-meta-data-from-the-photo/m-p/10400906

 

 

//community.adobe.com/t5/Photoshop/Script-to-remove-all-meta-data-from-the-photo/m-p/10400906

// Remove All Metadata & Retain Layers - a brute force alternative to ExifTool  

#target Photoshop

// Error check and run on layered files  
//forums.adobe.com/thread/2586379 - r-bin  
var origDoc = activeDocument;
var ok = true;
var background_present = true;
try {
    origDoc.backgroundLayer;
} catch (e) {
    background_present = false;
}
// Doc only has Background layer
if (background_present && origDoc.artLayers.length == 1 && origDoc.layerSets.length == 0) ok = false;
// Doc has only 1 layer (optional, uncomment the line below if required)
// if (!background_present && origDoc.artLayers.length == 1 && origDoc.layerSets.length == 0) ok = false;
if (ok) {
// Park the error checking and run the main script  
var origFilename = app.activeDocument.name.replace(/\.[^\.]+$/, ''); // Remove filename extension from original  
// Expand all layer sets
//forums.adobe.com/message/5764024#5764024
function openAllLayerSets( parent ){  
    for(var setIndex=0;setIndex<parent.layerSets.length;setIndex++){  
        app.activeDocument.activeLayer = parent.layerSets[setIndex].layers[0];  
        openAllLayerSets( parent.layerSets[setIndex]);  
    }  
};  
openAllLayerSets( app.activeDocument );
// Select all layers and layer groups/sets!
//feedback.photoshop.com/photoshop_family/topics/i-cant-record-sellect-all-layers-in-script-li...
selectAllLayers();
function selectAllLayers() {
  var c2t = function (s) {
  return app.charIDToTypeID(s);
  };
  var s2t = function (s) {
  return app.stringIDToTypeID(s);
  };
  var descriptor = new ActionDescriptor();
  var descriptor2 = new ActionDescriptor();
  var reference = new ActionReference();
  var reference2 = new ActionReference();
  reference2.putEnumerated( s2t( "layer" ), s2t( "ordinal" ), s2t( "targetEnum" ));
  descriptor.putReference( c2t( "null" ), reference2 );
  executeAction( s2t( "selectAllLayers" ), descriptor, DialogModes.NO );
  reference.putProperty( s2t( "layer" ), s2t( "background" ));
  descriptor2.putReference( c2t( "null" ), reference );
  descriptor2.putEnumerated( s2t( "selectionModifier" ), s2t( "selectionModifierType" ), s2t( "addToSelection" ));
  descriptor2.putBoolean( s2t( "makeVisible" ), false );
  try{
  executeAction( s2t( "select" ), descriptor2, DialogModes.NO );
  }catch(e){}
}
// Duplicate all selected layers to new document  
    cTID = function(s) {
        return app.charIDToTypeID(s);
    };
    sTID = function(s) {
        return app.stringIDToTypeID(s);
    };
    function DupeSelectedLayers() {
        function step1(enabled, withDialog) {
            if (enabled != undefined && !enabled)
                return;
            var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
            var desc1 = new ActionDescriptor();
            var ref1 = new ActionReference();
            ref1.putClass(cTID('Dcmn'));
            desc1.putReference(cTID('null'), ref1);
            desc1.putString(cTID('Nm  '), origFilename + "_Sanitised"); // Use the original document filename + sufix
            // desc1.putString(cTID('Nm  '), origFilename ); // Use the original document filename, beware overwriting the original file and losing all metadata!              
            var ref2 = new ActionReference();
            ref2.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));
            desc1.putReference(cTID('Usng'), ref2);
            desc1.putInteger(cTID('Vrsn'), 5);
            executeAction(cTID('Mk  '), desc1, dialogMode);
        };
        step1();
    };
    DupeSelectedLayers.main = function() {
        DupeSelectedLayers();
    };
    DupeSelectedLayers.main();
// Deselect layers  
//forums.adobe.com/message/5204655#5204655 - Michael L Hale  
    app.runMenuItem(stringIDToTypeID('selectNoLayers'));
    
// Collapse all layer groups/sets
    app.runMenuItem(stringIDToTypeID('collapseAllGroupsEvent'));
/////////////////////////////////////////////////////////////////////////
// Run on flattened files  
} else {
    
var origDoc = activeDocument;
var origFilename = app.activeDocument.name.replace(/\.[^\.]+$/, ''); // Remove filename extension from original  
    
// Duplicate all selected layers to new document  
    cTID = function(s) {
        return app.charIDToTypeID(s);
    };
    sTID = function(s) {
        return app.stringIDToTypeID(s);
    };
    function DupeSelectedLayers() {
        function step1(enabled, withDialog) {
            if (enabled != undefined && !enabled)
                return;
            var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
            var desc1 = new ActionDescriptor();
            var ref1 = new ActionReference();
            ref1.putClass(cTID('Dcmn'));
            desc1.putReference(cTID('null'), ref1);
            desc1.putString(cTID('Nm  '), origFilename + "_Sanitised"); // Use the original document filename + sufix
            // desc1.putString(cTID('Nm  '), origFilename ); // Use the original document filename, beware overwriting the original file and losing all metadata!    
            var ref2 = new ActionReference();
            ref2.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));
            desc1.putReference(cTID('Usng'), ref2);
            desc1.putInteger(cTID('Vrsn'), 5);
            executeAction(cTID('Mk  '), desc1, dialogMode);
        };
        step1();
    };
    DupeSelectedLayers.main = function() {
        DupeSelectedLayers();
    };
    DupeSelectedLayers.main();
}

 

  

Votes

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