Append color & black and white

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

Append color & black and white

Post by LotusE »

Hello everybody,

I have a script that merges 2 images horizontally using the ImageMagick Convert command with the -append option. Everything works fine, it was just click and forget until now: 1 of the 2 images that I want to append is a black & white image. When I append it to the color Image, the color image becomes black & white too.

Is there any way that I can prevent this from happening?

Thanks for the information!
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Append color & black and white

Post by snibgo »

Yes, probably.

To help us help you, we need some more information. What version of IM on what platform? Exactly what was your command? It may help if you provide sample images that show the problem.
snibgo's IM pages: im.snibgo.com
LotusE
Posts: 10
Joined: 2014-01-26T07:14:12-07:00
Authentication code: 6789

Re: Append color & black and white

Post by LotusE »

It's Imagemagick 6.8.8-Q16. I'm using the ImageMagick object in an Autoit script. This is my simple code:

$nresult= $oimg.Convert($cfileA, $cfileB, "+append", $cfileA)

So I'm appending image file B to file A and I save it under the name of file A.

I had this with one of the personal image files of a client, so I'm not in the liberty of posting these images here.

I'm gonna see if I can replicate the problem with one of my own files and I'll get back to you.
LotusE
Posts: 10
Joined: 2014-01-26T07:14:12-07:00
Authentication code: 6789

Re: Append color & black and white

Post by LotusE »

Forgot to mention: the platform is Windows 7
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Append color & black and white

Post by snibgo »

v6.8.8 should be fine. I know nothing about Autoit. You might find that changing "+append" to "+append -type Truecolor" does the trick.

Otherwise, perhaps you can:

Code: Select all

identify -verbose fileA
identify -verbose fileB
and post the text output here. Put it between [ code ] and [ / code] to preserve the formatting.
snibgo's IM pages: im.snibgo.com
RobertHiedrick
Posts: 1
Joined: 2014-01-26T16:38:48-07:00
Authentication code: 6789

Re: Append color & black and white

Post by RobertHiedrick »

Had the same probllem, but this isn´t working :-(
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Append color & black and white

Post by snibgo »

If you have a problem in Autoit, I suggest you try to replicate the situation at the command line.
snibgo's IM pages: im.snibgo.com
Post Reply