Need help writing DOS script
Posted: 2014-05-04T18:53:25-07:00
I want to make a DOS script to do the following to images
- make square
- reduce size
I'm not sure where to start. I haven't been able to get to the second part
I did some googling and believe this will give me the width:
(Similar for height)
If height is smaller, the crop the width of the image left and right to make the width be the same
Do similar if width is smaller
When I try the following, I get an error saying missing operator
Same if I do this:
(Leaving out the backtics)
Anyone know where I'm going wrong?
Thanks
JJ
- make square
- reduce size
I'm not sure where to start. I haven't been able to get to the second part
I did some googling and believe this will give me the width:
Code: Select all
w=`identify -format "%w" image.png`
If height is smaller, the crop the width of the image left and right to make the width be the same
Do similar if width is smaller
When I try the following, I get an error saying missing operator
Code: Select all
set /a w=`identify -format "%w" bmw.png`
Code: Select all
set /a w=identify -format "%w" bmw.png
Anyone know where I'm going wrong?
Thanks
JJ