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