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
Increase Resolution screen
Download
Increase Resolution

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 2021 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.

*/

//@target photoshop

(function () {
    if (!app.documents.length) {
        alert("Open an image", "", false);
        return;
    }
    var doc = app.activeDocument;
    var res = Number(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 > 0) {
        doc.resizeImage(null, null, res, ResampleMethod.NONE);
    }
    var desc1 = new ActionDescriptor();
    desc1.putUnitDouble(charIDToTypeID('Rslt'), charIDToTypeID('#Rsl'), 300); // <== target resolution
    desc1.putBoolean(charIDToTypeID('CnsP'), true);
    desc1.putEnumerated(charIDToTypeID('Intr'), charIDToTypeID('Intp'), stringIDToTypeID("deepUpscale"));
    desc1.putInteger(charIDToTypeID('Nose'), 20); // <== reduce noise %
    executeAction(stringIDToTypeID('imageSize'), desc1, DialogModes.NO);
})();
Download
Increase Resolution

License details included in download

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

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