What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Scripting Measurement Scale script


If you want to resize the document, the code would be...
Code:
var doc = activeDocument;
var Width = doc.width.as('cm');
doc.resizeImage(new UnitValue(Width,'cm'), undefined, 72, ResampleMethod.BICUBIC);
 
Tried and, I get an error:
Screen Shot 2016-05-13 at 08.39.33.png

I get same error when selection is not active.

change of PPI work flawless :) thank you :)

when I run it second time, after reselecting all elements and run script again it works as it should ( because after first run file is in 72PPI )
maybe I'm wrong but, I think I'ts impossible to change PPI / Size while selection is active :(
 
UPDATE :)
I made workaround:

1. store selection in a channel
1b. if ppi is not 72 - change it and load stored selection

2. change measurement scale
3. measure

works great and I'm happy :)
Thank guys for your time, help and knowledge :)
 

Back
Top