Windows batch file - width / height operations
Posted: 2014-02-14T09:20:33-07:00
I use ImageMagick 6.8.2-8 2013-02-09 Q16 under Windows 7 x64 SP1 Ultimate.
I 'm trying to apply Perspective distort, but I need to use width / height coordinates.
This works OK:
But this is what I need:
The difference is height minus 70 pixels - "%%h"-70
I have tried these and they do not work:
"%%h"-70
"%%h-70"
""%%h"-70"
Please help. Thanks.
I 'm trying to apply Perspective distort, but I need to use width / height coordinates.
This works OK:
Code: Select all
convert out_textured.jpg -alpha set -virtual-pixel transparent -distort Perspective 0,0,9,95,0,"%%h",0,"%%h","%%w","%%h","%%w","%%h","%%w",0,"%%w",0 out_pers.png
Code: Select all
convert out_textured.jpg -alpha set -virtual-pixel transparent -distort Perspective 0,0,9,95,0,"%%h",0,"%%h"-70,"%%w","%%h","%%w","%%h","%%w",0,"%%w",0 out_pers.png
I have tried these and they do not work:
"%%h"-70
"%%h-70"
""%%h"-70"
Please help. Thanks.