Page 1 of 1

Convert jpg producing an unwanted monochrome result

Posted: 2020-01-02T11:58:07-07:00
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

Re: Convert jpg producing an unwanted monochrome result

Posted: 2020-01-02T13:34:15-07:00
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".

Re: Convert jpg producing an unwanted monochrome result

Posted: 2020-01-03T03:11:09-07:00
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 :-)

Re: Convert jpg producing an unwanted monochrome result

Posted: 2020-01-03T10:34:36-07:00
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