Canvas size

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Canvas size

Colin Sturm
I have a macro that reads width and height of a selected image from a
drop down dialog.
I want to pass the width and height to the canvas resizer with a
different value.
The macro recorder gives me:
run("Canvas Size...", "width=125 height=65 position=Bottom-Center");

I want:
w=getWidth();
h=getHeight()+1;
run("Canvas Size...", "width=w height=h position=Bottom-Center");


Is there anyway to pass variables to built-in functions?
Or is there an easier way for me to resize my image than my current method?

Thanks
Colin Sturm
Reply | Threaded
Open this post in threaded view
|

Re: Canvas size

Michael Doube-2
Colin

run("Canvas Size...", "width="+w+" height="+h+" position=Bottom-Center");

should work

Mike

Colin Sturm wrote:

> I have a macro that reads width and height of a selected image from a
> drop down dialog.
> I want to pass the width and height to the canvas resizer with a
> different value.
> The macro recorder gives me:
> run("Canvas Size...", "width=125 height=65 position=Bottom-Center");
>
> I want:
> w=getWidth();
> h=getHeight()+1;
> run("Canvas Size...", "width=w height=h position=Bottom-Center");
>
>
> Is there anyway to pass variables to built-in functions?
> Or is there an easier way for me to resize my image than my current
> method?
>
> Thanks
> Colin Sturm

--
Michael Doube  BPhil BVSc MRCVS
PhD Student
Dental Institute
Queen Mary, University of London
New Rd
London  E1 1BB
United Kingdom

Phone +44 (0)20 7377 7000 ext 2681