Bug in Imagemagick Object?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
LotusE
Posts: 10
Joined: 2014-01-26T07:14:12-07:00
Authentication code: 6789

Bug in Imagemagick Object?

Post by LotusE » 2014-03-30T02:05:47-07:00

Hello everyone,

I use AutoIT in combination with Imagemagick to do an automatic processing of files. I use the Imagemagick object to manipulate the files.

The last step in this process is the merging of 2 pictures. Lately, I discovered that with some black and white pictures (not all!), if they are merged with a colour image, that the colour image turns B&W too.

I've been debugging this through all the steps and if found that when I merge the two files using Imagemagick in the DOS command prompt, that I do not have this problem. This is the command that I used in the command prompt:

convert "c:\temp\image1.jpg" "c:\temp\image2.jpg" +append "c:\temp\result.jpg"

So it only occurs when I use the imagemagick object. This is the code that I use in AutoIT:

$oimg = ObjCreate("ImageMagickObject.MagickImage.1")
$nres = $oimg.Convert("c:\temp\image1.jpg", "c:\temp\image2.jpg", "+append", "c:\temp\result.jpg")

and that's where it goes wrong. My version of Imagemagick is 6.8.8-q16. You can download two sample pictures from https://dl.dropboxusercontent.com/u/19947583/bw.zip if you want to test it yourself.

Is this a known error? What can I do to get this right?

Thanks in advance for the help!

Steve

Post Reply