remove metadata labels from images

Upload Photoshop Scripts, download Photoshop Scripts, Discussion and Support of Photoshop Scripts

Moderators: Tom, Kukurykus

flieckster
Posts: 4
Joined: Thu Jan 01, 1970 12:00 am
Location: king of prussia, PA

remove metadata labels from images

Post by flieckster »

i'm looking for a little snippet to add to my scripts to remove any color label data from images. Can anyone point me in a direction? :D
User avatar
Kukurykus
Posts: 528
Joined: Mon Jul 25, 2016 12:36 pm

Re: remove metadata labels from images

Post by Kukurykus »

It should be posted in Bridge Scripting section, as now I'm not sure aren't you asking of colours bound to document layers, but if not then this code embedded in your script should help:

Code: Select all

#target photoshop

(bt = new BridgeTalk()).target = 'bridge'
bt.body = "new Thumbnail(File('" +
activeDocument.fullName + "')).label = ''"
bt.send(2)
flieckster
Posts: 4
Joined: Thu Jan 01, 1970 12:00 am
Location: king of prussia, PA

Re: remove metadata labels from images

Post by flieckster »

Hi Kukurykus!

This worked, but it did target bridge to complete the job. is there no way to remove color labels just using PS?
User avatar
Kukurykus
Posts: 528
Joined: Mon Jul 25, 2016 12:36 pm

Re: remove metadata labels from images

Post by Kukurykus »

Why didn't you search for it on forums by using Search... blank? I didn't know how to do these 2 things before you asked, as I never needed it, so?

Code: Select all

xmp.rawData = (xmp = activeDocument.xmpMetadata).rawData.replace(/(\w+)(?=<\/xmp:La)/, '')