-resample convert from RGB to gray automatical

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
Norbert
Posts: 3
Joined: 2016-08-03T01:46:35-07:00
Authentication code: 1151

-resample convert from RGB to gray automatical

Post by Norbert »

I have some pictures witch are RGB. If I am using a command for example
input.jpg -resample 300 output.jpg
the rgb pictures comes out in grey. This is happening only by pictures witch have all 3 channels the same values. If there is 1% one color different, than is stay rgb. That is a problem. I have some pictures with one small red logo on it, but if i can not see the logo in one of them, than it will be convert in grey. I am using that for a lot of pictures witch will be showed in one screen at the same time. There the pictures looks different.
I also tried
input.jpg -colorspace rgb -resample 300 output.jpg
But I had the same Issue.
What can I do?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: -resample convert from RGB to gray automatical

Post by snibgo »

Norbert wrote:the rgb pictures comes out in grey. This is happening only by pictures witch have all 3 channels the same values.
If the RGB channels have the same values, the image is gray. There is no colour.
snibgo's IM pages: im.snibgo.com
Norbert
Posts: 3
Joined: 2016-08-03T01:46:35-07:00
Authentication code: 1151

Re: -resample convert from RGB to gray automatical

Post by Norbert »

that is true, but i need the picture in rgb. and it is rgb in so it should rgb out.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: -resample convert from RGB to gray automatical

Post by snibgo »

If you want to force the output file to be a particular type, use "-type", eg:

Code: Select all

input.jpg -resample 300 -type TrueColor output.jpg
snibgo's IM pages: im.snibgo.com
Norbert
Posts: 3
Joined: 2016-08-03T01:46:35-07:00
Authentication code: 1151

Re: -resample convert from RGB to gray automatical

Post by Norbert »

that is working. Thank you very much.
Post Reply