Jump to content

Run() & Imagemagick question


Recommended Posts

Okay... I give up... all I want to do is run the Imagemagick command line to resize an image. What am I doing wrong?

For $i = 1 To $CmdLine[0]
    $nextPicPath = $CmdLine[$i]
    ResizePic($nextPicPath)
Next

Func ResizePic($myPicPath)
    $myPathPieces = StringSplit($myPicPath, "\")
    $myFilename = $myPathPieces[$myPathPieces[0]]
    $myCmd = "convert """ & $myPicPath & """ -resize 800 ""C:\Temp\" & $myFilename & """"
    Run($myCmd)
EndFunc

Of course ShellExecute doesn't work either.

However, when I run $myCmd manually, it does work.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...