Copy link to clipboard
Copied
Hi, is it possible to find out image resolution directly from InDesign, or do I have to open the file in Photoshop to do it.
Thank you.
Yulia
Copy link to clipboard
Copied
var doc = app.activeDocument;
var graphics = doc.allGraphics;
var image, horRes, verRes;
for (var i = 0; i < graphics.length; i++) {
image = graphics;
try {
// The resolution of a graphic after it has been resized.
horEffRes = Math.round(image.effectivePpi[0]);
verEffRes = Math.round(image.effectivePpi[1]);
// The native resolution of a placed graphic.
horActRes = Math.round(image.actualPpi[0]);
verActRes = Math.round(image.actualPpi[1]);
$.writeln((i+1) + " - " + image.itemLink.name);
$.writeln("Effective resolution - " + horEffRes + "x" + verEffRes + " ppi");
$.writeln("Actual resolution - " + horActRes + "x" + verActRes + " ppi");
}
catch (err) {
// vector graphic
$.writeln((i+1) + " - " + image.itemLink.name + " - Resolution is unavailable");
}
}
Copy link to clipboard
Copied
Got it, thank you.
Copy link to clipboard
Copied
You should also mark correct answer!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now