Getting started
Posted: 2008-10-15T16:52:41-07:00
Sorry if this is very, very basic.
I have been issuing commands at the Windows command line, such as
...and getting a nice histogram of the top ten colours in an image. Now I'm trying to put that into a VBscript, and getting nowhere.
So far, I have:
...but this outputs a lengthy pixel enumeration, not a histogram. I got the idea of sticking all the variables in as comma-separated switches from a million different searches on Google and one or two posts here. But clearly, it's not the right thing to do!
How can I get my original command prompt command to work in VBScript?
Is there any documentation of generally converting command line success stories into VBscript?
I have been issuing commands at the Windows command line, such as
Code: Select all
convert C:\Pictures\19732685.jpg -format %c -colors 10 -depth 8 histogram:info:- >> C:\Pictures\analysis.txt
So far, I have:
Code: Select all
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set img = CreateObject("ImageMagickObject.MagickImage.1")
Set WshShell = WScript.CreateObject("WScript.Shell")
img.Convert "C:\Pictures\19732685.jpg","-format","%c","-colors","5","-depth", "8", "histogram", "C:\Pictures\analysis.txt"
How can I get my original command prompt command to work in VBScript?
Is there any documentation of generally converting command line success stories into VBscript?