convert "E:\test1.tif" -profile "C:\Profile1.icc" -profile "C:\Profile2.icc" +profile "!icc,*" E:\test1.jpg
As you can see, since there are two parameters assigned to the +profile command they must be enclosed in quotes.
Trying to accomplish this with the ImageMagickObject from vbscript however is presenting a problem.
None of the following example work, all profile data is retained.
Code: Select all
sReslt = oIM.Convert("E:\test1.tif","-profile=C:\Profile1.icc","-profile=C:\Profile2.icc","+profile=!icc,*","E:\test1.jpg")
sReslt = oIM.Convert("E:\test1.tif","-profile=C:\Profile1.icc","-profile=C:\Profile2.icc","+profile=""!icc,*""","E:\test1.jpg")
sReslt = oIM.Convert("E:\test1.tif","-profile=C:\Profile1.icc","-profile=C:\Profile2.icc","+profile=""!icc" & Chr(44) & "*""","E:\test1.jpg")
Note that if I use just the wildcard and remove all profiles it works fine (...,"+profile=*",...). So the comma is what's messing things up, but how do I overcome this?
Is there something simple I'm overlooking here?