ImageMagick with VBScript & format option in Convert
Posted: 2009-09-03T01:11:29-07:00
Hi all.
I am trying a script for determining the color percentage of black and white pixels of an image. After searching, I have found the following syntax that works:
and returns the pixel count of black & white pixels.
When trying to call the same function through vbscript, I get the txt file which has color data for each pixel instead of the total number of pixels for each color. The syntax I am using is the following:
I know i am doing something wrong, but... can you point me the wrong part?
Thanks
I am trying a script for determining the color percentage of black and white pixels of an image. After searching, I have found the following syntax that works:
Code: Select all
convert filename.tif -colors 2 -format %c histogram:info: >> c:\output.txt
When trying to call the same function through vbscript, I get the txt file which has color data for each pixel instead of the total number of pixels for each color. The syntax I am using is the following:
Code: Select all
Set imageMagick = CreateObject("ImageMagickObject.MagickImage.1")
tmp = imageMagick.Convert("c:/filename.tif","-colors",2,"-format","%c histogram:info:","c:/output.txt")
Thanks