Page 1 of 1

Cannot process tiff files

Posted: 2013-03-25T17:00:02-07:00
by SimonKravis
I'm using IM 6.8.3-Q8 (32 bit windows dynamic on XP) from a VBA environment using the IM Com object ImageMagickOject.MagickImage.1 to process a multi-page tiff file created by Ghostscript from PDF files.

Invocation is

Code: Select all

Set imgMkObj =CreateObject("ImageMagickOject.MagickImage.1")
When I use

Code: Select all

imgMkObj.Convert p1.tif p1.jpg
to convert from tiff to jpg I get the expected output with a single jpg created for each page

When i use

Code: Select all

imgMkObj.Convert p1.tif p2.tif
p2.tif gets created OK. It's much smaller than p1.tif, perhaps because it's compressed.

But if i try to put in a processing parameter eg

Code: Select all

imgMkObj.Convert p1.tif, "-blur 0x6", p2.tif 
or

Code: Select all

 imgMkObj.Convert p1.tif, "-resize 50%", p2.tif
Then p2.tif does not get created and no error condition is flagged.

Any ideas?

Re: Cannot process tiff files

Posted: 2013-03-25T21:29:52-07:00
by SimonKravis
SimonKravis wrote:I'm using IM 6.8.3-Q8 (32 bit windows dynamic on XP) from a VBA environment using the IM Com object ImageMagickOject.MagickImage.1 to process a multi-page tiff file created by Ghostscript from PDF files.

Invocation is

Code: Select all

Set imgMkObj =CreateObject("ImageMagickOject.MagickImage.1")
When I use

Code: Select all

imgMkObj.Convert p1.tif p1.jpg
to convert from tiff to jpg I get the expected output with a single jpg created for each page

When i use

Code: Select all

imgMkObj.Convert p1.tif p2.tif
p2.tif gets created OK. It's much smaller than p1.tif, perhaps because it's compressed.

But if i try to put in a processing parameter eg

Code: Select all

imgMkObj.Convert p1.tif, "-blur 0x6", p2.tif 
or

Code: Select all

 imgMkObj.Convert p1.tif, "-resize 50%", p2.tif
Then p2.tif does not get created and no error condition is flagged.

Any ideas?
Problem is that for object called from VBA, all parameters need to be separated by commas eg

Code: Select all

imgMkObj.Convert p1.tif, "-blur", "0x6", p2.tif