Page 1 of 1

-resample convert from RGB to gray automatical

Posted: 2016-08-03T01:56:17-07:00
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?

Re: -resample convert from RGB to gray automatical

Posted: 2016-08-03T04:33:03-07:00
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.

Re: -resample convert from RGB to gray automatical

Posted: 2016-08-03T06:44:01-07:00
by Norbert
that is true, but i need the picture in rgb. and it is rgb in so it should rgb out.

Re: -resample convert from RGB to gray automatical

Posted: 2016-08-03T07:20:59-07:00
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

Re: -resample convert from RGB to gray automatical

Posted: 2016-08-03T07:32:11-07:00
by Norbert
that is working. Thank you very much.