Skip to main content
Inspiring
October 3, 2019
Answered

Image View

  • October 3, 2019
  • 4 replies
  • 1800 views

Is there a way when I have the image/photo open in photoshop to change the view size setting. it's at 16.3% I would like to keep it at 25%, especially when I crop.

Thank you!

 

This topic has been closed for replies.
Correct answer Tom Winkelmann

You can use the Script Event-Manager and this script...

setZoom( 25);

function setZoom( zoom ) {// as percent
   cTID = function(s) { return app.charIDToTypeID(s); }; // from xbytor
   var docRes = activeDocument.resolution;
   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 );
}

4 replies

Bojan Živković11378569
Community Expert
Community Expert
October 4, 2019

Here is my tutorial on how to use Script Events Manager https://www.designeasy.co/2011/06/automate-photoshop-with-script-events.html and  https://www.designeasy.co/2018/06/how-to-automate-boring-tasks-using.html Feel free to ask any additional question if you need more help.

A.HerdenAuthor
Inspiring
October 4, 2019
I know the zoom in and out.. I was just wondering if there was a preferred setting so when you open images in photoshop the image would be at 25% or 33% instead of 16.3%, especially after cropping.
Tom Winkelmann
Inspiring
October 4, 2019
If you don't wanna use the Script Events Manager, use a shortcut to start the script (script must be in your scripts folder of PS)...
Tom Winkelmann
Tom WinkelmannCorrect answer
Inspiring
October 4, 2019

You can use the Script Event-Manager and this script...

setZoom( 25);

function setZoom( zoom ) {// as percent
   cTID = function(s) { return app.charIDToTypeID(s); }; // from xbytor
   var docRes = activeDocument.resolution;
   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 );
}
Bojan Živković11378569
Community Expert
Community Expert
October 4, 2019

There isn't option in Preferences for percentage view settings or magnification level when opening/cropping images. You can not record action for this purpose either. You can record step in action to fit on screen but not to set magnification level to any particular percent beside hundreed 100% and two hundreds 200% what is available from View menu

Stephen Marsh
Community Expert
Community Expert
October 4, 2019

Agreed, however, it is possible to chain together available zoom levels to create an action that can reach 25% by starting at 100% then zooming out 4 times. Sure it’s clunky, but it works:

 

Stephen Marsh
Community Expert
Community Expert
October 4, 2019