Page 1 of 1
-background "black" option make image darker
Posted: 2012-12-14T04:17:16-07:00
by rogercampos
Using the following comand with a jpg image without transparency makes the image look darker:
Code: Select all
convert cuca.png -background "black" out.png
However using "red" for instance does not make it look red. If I understant the background command correctly it should just add a background color to the image, visible if it's transparent or has pixels with low opacity (alpha channel). The image is however a jpeg with no transparency. I'll send you a private link to download the image I'm using.
Re: -background "black" option make image darker
Posted: 2012-12-14T09:40:08-07:00
by glennrp
What happens if you use "-background white" instead? I suspect that
it will also be darker (i.e., the "-background" really has nothing to do
with what you are seeing). If you haven't tested with the latest version
of IM (currently 6.8.0-9), please do so, because there have been some
bugs recently fixed in the PNG codec having to do with sRGB versus RGB
colorspaces that may be the reason for what you are seeing.
If you've done all that and still see the problem, please send the
link to glennrp at imagemagick dot org.
Re: -background "black" option make image darker
Posted: 2012-12-14T10:07:59-07:00
by rogercampos
You're right, using -background 'white' the result is the same, a darker image. I was trying this with imagemagick version 6.8.0-7. I downloaded and installed now the latest version (6.8.0-9) and the result is now fine, so the bug may be fixed. Thanks.
Re: -background "black" option make image darker
Posted: 2012-12-14T12:33:59-07:00
by fmw42
I am puzzle. I thought that -background was a setting and thus should not make any changes to the image without some option such as -flatten.
Is this not the case?
Re: -background "black" option make image darker
Posted: 2012-12-15T12:17:29-07:00
by glennrp
fmw42 wrote:I am puzzle. I thought that -background was a setting and thus should not make any changes to the image without some option such as -flatten.
Is this not the case?
Correct. See my earlier response. The "-background" option did not actually have anything to do with the problem. Instead it was an error in the handling of sRGB versus RGB,
which I fixed in a recent version.
Re: -background "black" option make image darker
Posted: 2012-12-15T13:58:39-07:00
by fmw42
glennrp wrote:fmw42 wrote:I am puzzle. I thought that -background was a setting and thus should not make any changes to the image without some option such as -flatten.
Is this not the case?
Correct. See my earlier response. The "-background" option did not actually have anything to do with the problem. Instead it was an error in the handling of sRGB versus RGB,
which I fixed in a recent version.
Glenn,
Thanks for the clarification.
Fred