PDA

View Full Version : resize image script based on % ?


Labuzz
06-02-2005, 08:25 AM
hi,
I would like to know if there's a script to resize an image based on percent of the size of the image. I have no experience with the scripting in photoshop but I dont think its difficult to do. the script must take 2 arguments ( percent for width and height ) and query the size of the current image.
Well I have another question for another script : Can I set the B ( in HSB mode )value to 50% without affecting the H and S values ?
If anyOne has any info !
tky

Skjoldbroder
06-02-2005, 10:03 AM
yeah, sounds like the kind of thing you could just record an action for, even.

malcolmvexxed
06-03-2005, 04:25 AM
one of the options for image size is percentage so you'd just record an action where it goes to image size>changes the h and w percentage to what you want, hit ok, then presumably saves and closes and end the recording. if you have layered files and want them converted to jpegs etc. you'd obviously have to include a step to flatten the image too

berniebernie
06-06-2005, 12:01 PM
Both things are really easy to scripts though I'm not sure I understand the specifics of the first one..

There's a brand new PS scripts forum (started two weeks ago) so I reckon it would be better to ask your question over there: http://www.ps-scripts.com/bb/ (the founding members are the best scripters around)

As for the HSB, you can change the B by hand without changing the Hue and Sat values, but if you were to script it it would look somewhat like this:
----------------------------------------------
var newColor = new SolidColor();
newColor.brightness = variable1;
newColor.hue = variable2;
newColor.saturation = variable3;
----------------------------------------------

Remember that a brightness value and a saturation value is always between 0.0 and 100.0 and a hue value is always between 0.0 and 360.0

cheers!
mlk

Labuzz
06-06-2005, 03:07 PM
Tky For the help,
I will bookmark this new forum!

CGTalk Moderation
06-06-2005, 03:07 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.