My quick code posting missed this vital clue, I assumed that we were both on the same page regarding Photoshop:
#target photoshop
As you were initially posting a question in the Photoshop forum! The metadata scripts being Bridge based probably derailed you!
Install this into your application/program folder for Photoshop ... /Presets/Scripts
https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html
I have changed the code to remove this metadata after resizing using your new fields:
/* Resize Doc from Metadata Placeholders.jsx
Batch process photos, each to specific size using data file
https://community.adobe.com/t5/photoshop/batch-process-photos-each-to-specific-size-using-data-file/m-p/11092247 */
#target photoshop
/* Capture original rulers */
var origRulerUnits = app.preferences.rulerUnits;
/* Set rulers to px */
app.preferences.rulerUnits = Units.PIXELS;
/* photoshop:Source = "Source" - metadata placeholder field for width */
var metaWidth = app.activeDocument.info.source;
/* Convert value to integer */
var newWidth = parseInt(metaWidth);
/* photoshop:Instructions = "Instructions" metadata placeholder field for height */
var metaHeight = app.activeDocument.info.instructions;
/* Convert value to integer */
var newHeight = parseInt(metaHeight);
/* Resize */
app.activeDocument.resizeImage(newWidth, newHeight, null, ResampleMethod.BICUBIC);
/* Call function to delete Photoshop File Info */
//deleteFileInfo();
/* Reset rulers */
app.preferences.rulerUnits = origRulerUnits;
/* Function to delete Photoshop File Info */
function deleteFileInfo() {
if (ExternalObject.AdobeXMPScript === undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
var xmp = new XMPMeta(activeDocument.xmpMetadata.rawData);
xmp.deleteProperty(XMPConst.NS_PHOTOSHOP, "Credit");
xmp.deleteProperty(XMPConst.NS_PHOTOSHOP, "Instructions");
app.activeDocument.xmpMetadata.rawData = xmp.serialize();
}
To remove the metadata placeholders after resizing, uncomment this line by removing the // characters:
//deleteFileInfo();
To this:
deleteFileInfo();
P.S. You could just import one field, either the width or the height, then change the resize line to:
app.activeDocument.resizeImage(newWidth, null, null, ResampleMethod.BICUBIC);
In this case, removing the newHeight variable reference and replacing it with null
Thanks Steven! I finally got this to work properly. There are a few more steps I did to get this all to work so I'm going to list them here for anyone else that is looking to try this.
After I loaded the JavaScript into the Photoshop Scripts Folder in the Program Files Folder I recorded an Action in Photoshop just executing this script on 1 of the files and called it "Image Resizer Action". Then I went back to Bridge > Tools > Photoshop > Image Processor and used these options: (1) 550 images are pulled in through Bridge (2) I chose to Save in "Same Location" (3) "Save as JPEG" and unchecked the "Resize to Fit" option (4) Run Action: Defult Action, Image Resizer Action and I clicked RUN at the top.
It took a few minutes but all of the images resized based on the metadata and were loaded into a folder called JPEG within my existing folder!!!
Thanks again for all your help!