Current location - Health Preservation Learning Network - Healthy weight loss - Why is the same PSD file particularly large after opening? Is there a solution?
Why is the same PSD file particularly large after opening? Is there a solution?
1. Copy and paste the following code into a text document, save it, and change its name to pswt. Jsx format.

2.PS Open the file script in question, browse ... and select the saved pswt. Jsx file to solve it.

Function deletedocumentancestorsmetadata () {

what app = String(app . name); //String version of the application name

if(what app . search(" Photoshop ")& gt; 0){// Check photoshop specially, or you will get an error.

The//function clears the document ancestors from the file.

If (! Document. Length) {

Alert ("There are no open documents. Please open a file to run this script. )

Return;

}

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

var xmp = new xmp meta(active document . xmp metadata . raw data);

//Fuck off, ancestors of dirty documents!

xmp.deleteProperty(XMPConst。 NS_PHOTOSHOP,“DocumentAncestors

app . active document . xmpmetadata . raw data = xmp . serialize();

}

}

//Now run the function to remove the document ancestor.

deleteDocumentAncestorsMetadata();