Convert jpg producing an unwanted monochrome result

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
mirrorworld
Posts: 12
Joined: 2018-02-15T08:28:51-07:00
Authentication code: 1152

Convert jpg producing an unwanted monochrome result

Post by mirrorworld »

Hi guy hope someone can shed a little light on my issue
Until recently IM convert was working great, then imagemagick was update from 7.08-15 Q16 x86 to 7.0.9-13 and my converted images started to be produced in monochrome, can anyone help
Description of issue:
I produce a white canvas of a given size then compose 2 images onto it
Can be seen here
https://www.mirrorworld.co.uk/plain-mir ... -tool.html
Commands used along the way of the conversion
img.convert("-size",canvasSize,"canvas:white",temp)
After calculating the position I want the images to be on the created canvas I use the following
scale =img.convert(temp, smScale, "-geometry", position1, "-compose", "over", "-composite", finalScale)
scale =img.convert(finalScale, finalMirror, "-geometry", position2, "-compose", "over", "-composite", finalScale)
Has compose or composite changed from the two versions of IM I’ve stated ? or is something else causing the issue ?
Hope all that made sense
Thanks

snibgo
Posts: 12936
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Convert jpg producing an unwanted monochrome result

Post by snibgo »

Diagnosis would be easier if you showed your images.

But I expect the problem is that your first image (the white canvas) is saved as grayscale. If so, then save it as RGB (eg PNG24:x.png) or promote it to RGB (eg "-colorspace sRGB) or invert the order of inputs to the composite and use "DstOver".
snibgo's IM pages: im.snibgo.com

mirrorworld
Posts: 12
Joined: 2018-02-15T08:28:51-07:00
Authentication code: 1152

Re: Convert jpg producing an unwanted monochrome result

Post by mirrorworld »

## SOLVED, Sort of ##
Nothing I tried would seem to save a white canvas as colour as suggested, so instead of using :white as the canvas colour I used #fffffe, which solved the immediate problem, this is not correct I know, but it did solve the issue.
If anyone knows how to create a coloured white canvas that saves as colour and NOT greyscale please let me know. cheers Guys :-)

User avatar
fmw42
Posts: 26290
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert jpg producing an unwanted monochrome result

Post by fmw42 »

It depends upon your saved image format. If PNG, then save as PNG24:image.png. If other than PNG, the use -colorspace sRGB -type truecolor before saving

Post Reply