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

Delete "Document Title" entry directly from image file

Engaged ,
Aug 22, 2018 Aug 22, 2018

Hello,

If there is an entry in a field such as "Document Title" for a file such as an image file in Photoshop (this is different from the file name), is there a way to remove this entry from the image file? In other words, can I remove the entry for "Document title" directly from the image file rather than opening the image file in Photoshop, removing the entry for "Document title" in Photoshop, and then resaving the image under the same file name as I had opened it?

"Document Title" can be found under File/File Info in Photoshop.

Thanks.

4.0K
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
Adobe
Community Expert ,
Aug 22, 2018 Aug 22, 2018

If you can see a metadata field in File Info in Photoshop, then it will also be displayed if you select the file in the Adobe Bridge file browser and look at the Metadata panel. So you can edit the Document Title without opening it, by viewing the file in Adobe Bridge and editing the Document Title in the Metadata panel. You also don't have to save the file; the edit applies as soon as you press the Enter or Return key.

The other nice thing about doing it in Bridge is that you can do it in bulk. If you wanted to set (or delete the) Document Title for 200 images, just select the 200 images in Bridge and edit the Metadata panel once.

The fastest way to do this, to avoid having to do too much navigation in Bridge, is:

  1. Have the Adobe Bridge application icon visible on the desktop (in its folder, or in the macOS Dock or Windows Taskbar).
  2. Drag and drop the file to the Bridge application icon. This navigates Bridge to the file's folder, with the file selected.
  3. If the Metadata panel isn't visible in Bridge, open it.
  4. Edit the Metadata field and press Return or Enter when done.

The metadata fields are stored in an industry-standard way, so you could also do it with any other IPTC-compatible file browser you have around, like PhotoMechanic.

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
Engaged ,
Aug 23, 2018 Aug 23, 2018

Hello Conrad,

Thanks for your comprehensive answer. I will look into using Bridge for this. I was "content" on doing it in Photoshop. But I was looking for a way to do it with, for example, the file explorer in Windows. Is it possible?

Update:

This is for CS4. I went into Bridge, per your suggestion. I looked for a file which has a "Document Title" when viewed in Photoshop File>File Info>Document Title. In Bridge, for that same file, the Metadata Panel showed nothing under IPTC (IIM, legacy)>Document Title. So in Bridge>Edit>Preferences, for Metadata, I selected every possible options there is in IPTC (IIM, legacy) and IPTC Core, just in case the Document Title in Photoshop would be under a different label in Bridge. But once again, I could not see the Document Title name I was looking for in Metadata.

So, in Bridge, I manually wrote a value for a given file in Metadata>Document Title. I could then see that value in Bridge under Metadata. I opened that file in Photoshop and I could also see that value in File>File Info>Document Title (as expected).

It appears that something is broken regarding the Document Title field.

Now, if I manually remove the Document Title for an image file in Photoshop and save the file again, would that affect anything else, like the image itself? For example, if the image file is a jpeg file, I open it in Photoshop, delete its Document Title, and save it again (with Save, not Save As), would it process the image again?

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 ,
Aug 23, 2018 Aug 23, 2018

sPretzel  wrote

I went into Bridge, per your suggestion. I looked for a file which has a "Document Title" when viewed in Photoshop File>File Info>Document Title. In Bridge, for that same file, the Metadata Panel showed nothing under IPTC (IIM, legacy)>Document Title. So in Bridge>Edit>Preferences, for Metadata, I selected every possible options there is in IPTC (IIM, legacy) and IPTC Core, just in case the Document Title in Photoshop would be under a different label in Bridge. But once again, I could not see the Document Title name I was looking for in Metadata.

Note that I am doing this in Photoshop and Bridge CC 2018, not CS4.

I was able to find a Document Title field in the Bridge metadata preferences, and when I selected it and then went back out into the Bridge Metadata panel, I could see the value I entered in the Document Title field in Photoshop. So it worked as expected in CC 2018. Maybe there is a problem with that field in the CS4 version, I don't know.

Conrad-Chavez-metadata-Document-Title.jpg

sPretzel  wrote

Now, if I manually remove the Document Title for an image file in Photoshop and save the file again, would that affect anything else, like the image itself? For example, if the image file is a jpeg file, I open it in Photoshop, delete its Document Title, and save it again (with Save, not Save As), would it process the image again?

I’m pretty sure metadata can be edited without re-processing the entire image, because the metadata is in a different part of the file structure. But editing metadata will affect the File Modified Date.

sPretzel  wrote

I was looking for a way to do it with, for example, the file explorer in Windows. Is it possible?

In Explorer in Windows 10, you can browse metadata for a selected file by opening the Properties dialog box and clicking the Details tab, you might know this already. But when I tried it with different file types, sometimes the fields could be edited and sometimes they couldn’t. When I tried a PSD file, Document Title was not there and the rest of the fields couldn’t be edited. I’m assuming that dialog box is set up by Windows, so maybe there’s a setting in Windows somewhere to change how it works. But that’s getting outside of what I know, as a Mac user.

Uneven support for Document Title might have something to do with it being in the Legacy category. I noticed it isn't in the IPTC Field Reference Table, but maybe I’m looking in the wrong place.

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 ,
Aug 24, 2018 Aug 24, 2018

Opening and resaving a JPEG file in Photoshop will indeed decompress/recompress the binary image data. This is not the ideal way to remove metadata. The degradation may only be minor, but still not best practice.

Bridge would be better if you can get that to work from the Metadata panel. If you can’t, then you could create a Metadata template and then replace the existing metadata with the blank template entry (this removes the value but leaves the blank metadata entry in the file).

Otherwise I’d use the command line ExifTool program to totally remove the title metadata and also preserve the original date and time. The original file will be overwritten, so backup first or work on duplicates until you are sure of the results. The following code is for Mac, Windows users would change the single straight quotes to double straight quotes enclosing the file/folder path:

exiftool -overwrite_original -P -title= -objectname= -r 'path\to file\or top-level folder containing multiple files and sub-folders'

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
Engaged ,
Aug 24, 2018 Aug 24, 2018

Conrad, thank you very much for taking the time. I have researched what can be done with Windows explorer and it is apparently not possible (anymore). If I understood correctly, it used to be possible in 32-bit Windows but no longer in 64-bit. Something to do with a dll file and Adobe that did not update it for 64-bit but don't quote me on this as it is beyond my knowledge. Perhaps someone in this forum can explain in layman's terms what this is about. I couldn't even see the Document Title for any of the files I tried in Windows Explorer.

Stephen. I suspected that the image might be undergoing some changes in a simple Save operation. I will look into your suggestion in Bridge but as noted previously, what worked for Conrad in CC 2018 did not work for me in CS4. It is all too much of a hassle though. Since you mention the Command Line route, I now wonder if the Document Title and file metadata in general can be viewed and modified in the Command Line, without resorting to anything outside the existing command set (like ExifTool or another third-party program).

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
Engaged ,
Aug 24, 2018 Aug 24, 2018

Fwiw, there is a front-end for ExifTool, ExifToolGUI. You can download it at http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,2750.0.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
Community Expert ,
Aug 26, 2018 Aug 26, 2018

IMHO a GUI is a crutch that will hinder your CLI progress (unless your use of ExifTool is lightweight)… Just get in there and work on duped files for safety, the command line is not that scary!

Both the command prompt in Windows and the Terminal.app on the Mac will allow a user to drag a file or folder into the window to populate the path to the folder or image. So all one need to is type in the CLI code and a space before dragging in the file/folder and hitting enter/return.

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 ,
Aug 24, 2018 Aug 24, 2018

Stephen_A_Marsh  wrote

Opening and resaving a JPEG file in Photoshop will indeed decompress/recompress the binary image data. This is not the ideal way to remove metadata. The degradation may only be minor, but still not best practice.

Bridge would be better if you can get that to work from the Metadata panel. If you can’t, then you could create a Metadata template and then replace the existing metadata with the blank template entry (this removes the value but leaves the blank metadata entry in the file).

Yes, it looks like I read the original post incorrectly. I replied as if the metadata was edited with Bridge. If the image is opened in Photoshop and only the metadata is edited, a recompression would still be applied.

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
LEGEND ,
Aug 24, 2018 Aug 24, 2018

You can use Bridge to remove metadata, either manually, with a saved template, or using a script (Extendscript, which is an offshoot of JavaScript.)

You could also do this with a script within Photoshop and not have to individually open and resave the file. Note that Photoshop (like most modern JPEG editors) does not recompress unchanged image blocks and so there should be no loss of quality.

Finally, you can use a third-party tool that can edit metadata. Exiftool was mentioned and there are lots of other programs available.

This is an example Bridge script that would delete the title field. Paste this into a text editor, save as a .jsx file, open Bridge preferences and the Startup Scripts folder, drag the .jsx file in, and relaunch Bridge.

-----------------------------------------------------

#target bridge

if( BridgeTalk.appName == "bridge" ){

    FT = MenuElement.create("command", "Delete Title", "at the end of Tools");

    }

FT.onSelect = function (){

    DeleteTitle();

    }

function DeleteTitle(){

     try{

         var thumbs = app.document.selections;

         if(!thumbs.length) return;

         if (ExternalObject.AdobeXMPScript == undefined)  ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");

         for(var a in thumbs){

              if(thumbs.hasMetadata){

                  var md = thumbs.synchronousMetadata;

                  var xmp = new XMPMeta(md.serialize());

                  xmp.deleteProperty(XMPConst.NS_DC, "title");

                  var updatedPacket = xmp.serialize(XMPConst.SERIALIZE_OMIT_PACKET_WRAPPER | XMPConst.SERIALIZE_USE_COMPACT_FORMAT);

                  thumbs.metadata = new Metadata(updatedPacket);

               }

          }

     }

     catch(e){

     }

}

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
Engaged ,
Aug 24, 2018 Aug 24, 2018

Hi Lumigraphics. Could you point me to an adobe document where they would confirm that? Please add to that that the image is unchanged but resaved (in order to account for the deleted Document Title), it is not simply opened in Photoshop, viewed, and closed.

Lumigraphics  wrote


You could also do this with a script within Photoshop and not have to individually open and resave the file. Note that Photoshop (like most modern JPEG editors) does not recompress unchanged image blocks and so there should be no loss of quality.

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
LEGEND ,
Aug 24, 2018 Aug 24, 2018

You can test this easily. Create a file and save as JPEG. Change the metadata and Save As. Now drag the Background layer from the new file onto the old one and set blending mode to Difference. To make sure you see variations, add a Levels adjustment layer with the white slider all the way to the left, so black is 0, gamma is 1, and white is 2.

Now look at all the pixels. If they are all black, there is no difference between the image data.

You can further test by saving at a different quality or using the brush tool set to one pixel to make tiny changes. Even if they can't be seen by the eye, the changes will show up this way.

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 ,
Aug 26, 2018 Aug 26, 2018

Thanks for sharing the script Lumigraphics!

After running your script, Bridge shows the metadata value as blank for Document Title – however ExifTool is still reporting the metadata in two fields: XMP-dc:Title and the legacy IPTC:ObjectName

_______

I had success with the following script hack:

// https://forums.adobe.com/thread/290238

// https://forums.adobe.com/message/1115698#1115698

// Delete "Document Title" entry directly from image file

#target bridge

clearTitle = {};// create an object

clearTitle.execute = function(){// create a method for that object

  var sels = app.document.selections;// store the array of selected files

  for (var i = 0; i < sels.length; i++){//loop though that array

    var md = sels.synchronousMetadata;// get the metadata for the file

     md.namespace = "http://ns.adobe.com/photoshop/1.0/";// set the namespace

     md.Title = "";//set the porperty

  }

}

// this script only works in bridge

if (BridgeTalk.appName == "bridge"){

  //creage the munuItem

  var menu = MenuElement.create( "command", "Clear Document Title Metadata", "at the end of Tools");

  menu.onSelect = clearTitle.execute;

}

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 ,
Aug 26, 2018 Aug 26, 2018
Note that Photoshop (like most modern JPEG editors) does not recompress unchanged image blocks and so there should be no loss of quality.

Lumigraphics​ – I too was unaware of this and would like to see a reference to this from Adobe. My comment was based on rather dated information Dan Margulis: Applied Color Theory - Resaving JPEGHowever when I have time I will setup an action for the repeated difference blend test. I prefer to use the equalize command to test for differences in the flattened data as it will report that there is only one brightness value if there is no difference.

_____________

EDIT: I just tested and my test did not confirm your comment that the open/save would be lossless if there were no pixel edits. There was no need to open/resave multiple times, it only took one step.

I had a “pristine” image that had never been JPEG compressed. The following steps were performed:

1) Save image as JPEG quality level 3 with Document Title metadata, close image

2) Open image, duplicate this image to compare subsequent save/open events against

3) Back in the opened image, apply metadata template to remove Document Title metadata, resave using same quality settings, close image

4) Open image again, layer the duped copy from step 2 in difference blend mode

5) Flatten the layers, then run the equalize command… A single value black only image was not returned after equalization, indicating that there was indeed JPEG recompression taking place

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
LEGEND ,
Aug 27, 2018 Aug 27, 2018

If you recompress it on save then yes it will be resampled. I tested and there was no change when you save the same file.

You can duplicate the file first if you want to retain the original.

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 ,
Aug 27, 2018 Aug 27, 2018

If you recompress it on save then yes it will be resampled. I tested and there was no change when you save the same file.

All I did was open the JPG, apply the metadata template to remove the Document Title and resave.

We are not talking about a Photoshop script or using Bridge in this specific instance, how else to remove the metadata and resave the JPEG file with the metadata removed? What am I missing?

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
LEGEND ,
Aug 28, 2018 Aug 28, 2018

I'm not sure why we are getting different results.

AFAIK Adobe has not published details of their JPEG libraries, but one of the big changes from early on with the format is that when saving, a modern compressor looks at blocks on disk and doesn't rewrite those that haven't changed. Not only that, but metadata is in the header of the file. There is no reason to touch the image data. You just write metadata changes at the correct offset and close the file.

It would make no sense whatsoever for a library to recompress and rewrite the image blocks if they don't change.

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
Engaged ,
Sep 13, 2019 Sep 13, 2019
LATEST
I am using Bridge CC 2018 and thumbs.hasMetadata is returning undefined. I can see the data in Bridge so it should be there. Do you have any idea why this doesn't 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