Increase Resolution

Script for Adobe Photoshop

This simple script is a productivity tool I created for working on layouts with images needing resolution, to get each done quickly in Photoshop and back to InDesign, then on to the next. The script not only increases PPI, it does the work of calculating how much, faster and in fewer steps. And the quality is good, as the script uses Photoshop’s Resample option Preserve Details 2.0, which does an excellent job.

  • Enter starting PPI and it becomes 300
  • Calculates enlargement based on entered PPI
  • Or upscale current PPI to 300
  • Adapt open source to customize or create other scripts
Download
Increase Resolution
Help me keep making new scripts by supporting my work. Click the PayPal button to contribute any amount you choose. Thank you. William Campbell

How-to Video

How to use the script

The interface is simply a prompt dialog, asking for starting resolution. The idea is to note the effective PPI shown in the InDesign Links panel, Link info. Then from the panel, edit original to open the image in Photoshop. Run the script, and enter the effective PPI from InDesign. Resolution is set to this value, then resampled to 300 PPI using Preserve Details 2.0. Save and close the image, and switch back to InDesign, which updates the link automatically. Effective PPI is now 300.

These steps don’t require a script to accomplish, but it’s tedious without it. You have to open Image Size, enter the effective PPI with Resample off, then turn on Resample and change resolution to 300, and ensure Preserve Details 2.0 is selected. This gives the same result. With the script it’s quicker to get done and back to the layout for the next image. As well, I’ve put the script on a function key, so I can really go fast. And like all scripts, not only does this enhance productivity, results are consistent, unlike performing each step manually for every image to upscale.

Source code

(download button below)

/*

Increase Resolution
Copyright 2023 William Campbell
All Rights Reserved
https://www.marspremedia.com/contact

Permission to use, copy, modify, and/or distribute this software
for any purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

*/

(function () {
    var desc1;
    var doc;
    var res;
    app.displayDialogs = DialogModes.NO;
    app.preferences.rulerUnits = Units.PIXELS;
    if (!app.documents.length) {
        alert("Open an image", "", false);
        return;
    }
    doc = app.activeDocument;
    res = prompt("Enter starting resolution\n(effective PPI at scale in layout)\nLeave blank for current PPI\nClick OK upscales to 300 PPI", "", "Increase Resolution");
    if (res === null) {
        return;
    }
    res = Number(res);
    if (res > 0) {
        doc.resizeImage(null, null, res, ResampleMethod.NONE);
    }
    desc1 = new ActionDescriptor();
    desc1.putUnitDouble(stringIDToTypeID("resolution"), stringIDToTypeID("densityUnit"), 300); // <== target resolution
    desc1.putBoolean(stringIDToTypeID("constrainProportions"), true);
    desc1.putEnumerated(stringIDToTypeID("interfaceIconFrameDimmed"), stringIDToTypeID("interpolationType"), stringIDToTypeID("deepUpscale"));
    desc1.putInteger(stringIDToTypeID("noise"), 20); // <== reduce noise %
    executeAction(stringIDToTypeID("imageSize"), desc1, DialogModes.NO);
})();
Help me keep making new scripts by supporting my work. Click the PayPal button to contribute any amount you choose. Thank you. William Campbell
Download
Increase Resolution

For help installing scripts, see How to Install and Use Scripts in Adobe Creative Cloud Applications.

IMPORTANT: scripts are developed for the latest Adobe Creative Cloud applications. Many scripts work in CC 2018 and later, even some as far back as CS6, but may not perform as expected, or run at all, when used in versions prior to 2018. Photoshop features Select Subject and Preserve Details 2.0 definitely fail prior to CC 2018 (version 19) as the features do not exist in earlier versions. For best results use the latest versions of Adobe Creative Cloud applications.

IMPORTANT: by downloading any of the scripts on this page you agree that the software is provided without any warranty, express or implied. USE AT YOUR OWN RISK. Always make backups of important data.

IMPORTANT: fees paid for software products are the purchase of a non-exclusive license to use the software product and do not grant the purchaser any degree of ownership of the software code. Author of the intellectual property and copyright holder William Campbell retains 100% ownership of all code used in all software products regardless of the inspiration for the software product design or functionality.