Is it possible to make the width on the screen look the same as the actual width?
Hi everyone.
The code below automatically sets the image to 100% size when it opens, but I later realized that at 350 or 300 dpi, 100% size doesn’t look realistic.
Later, I right-clicked the image in Photoshop, selected the Magnifying Glass tool, right-clicked the image again, and viewed it at print size. It still didn’t feel realistic to me. My image is 15 cm, but the print size appears very small. When I measured the image on the screen with a ruler, it wasn’t 15 cm either.
How can I modify the code below so that the image width in Photoshop looks and feels the same as the printed width?
Thank you.
// Call the zoom function from within suspendHistory
activeDocument.suspendHistory("Set Zoom to 100%", "setZoom(100)");
//// Open the image size dialog
//sTID = function (s) { return app.stringIDToTypeID(s); };
//try {
// executeAction(sTID('imageSize'), undefined, DialogModes.ALL);
//} catch (e) { if (e.number != 8007) { alert("Line: " + e.line + "\n\n" + e, "Bug!", true); throw (e); } }
function setZoom(zoom) {
var docRes = activeDocument.resolution;
try {
cTID = function (s) { return app.charIDToTypeID(s); };
activeDocument.resizeImage(undefined, undefined, 72 / (zoom / 100), ResampleMethod.NONE);
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putEnumerated(cTID("Mn "), cTID("MnIt"), cTID('PrnS'));
desc.putReference(cTID("null"), ref);
executeAction(cTID("slct"), desc, DialogModes.NO);
activeDocument.resizeImage(undefined, undefined, docRes, ResampleMethod.NONE);
} catch (error) {
if (docRes !== undefined) {
activeDocument.resolution = docRes;
}
alert("Line: " + (error.line || 'unknown') + "\n\n" + error.message, "Bug!", true);
throw error; // Optional to abort the script
}
}
