Hello,
I noticed that doing "-brightness-contrast bxc" and "-brightness-contrast bx0 -brightness-contrast 0xc" produce two different results. In the latter case I have tried to switch the order, but I still got two different results.
Is it possible to obtain the result as for the first command, but by using two separate commands for brightness and contrast?
It's a bit complicated to explain, but I cannot use the first single command.
Thanks in advance!
[Command line] About -brightness-contrast
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: [Command line] About -brightness-contrast
As the documentation http://www.imagemagick.org/script/comma ... s-contrast says, the brightness and contrast values define the slope and intercept for a linear transformation.
The function BrightnessContrastImage() in enhance.c calculates the slope from the contrast, and calculates the intercept from both the brightness and the slope.
So, in the general case, "-brightness-contrast bxc" will be different to "-brightness-contrast bx0 -brightness-contrast 0xc", in either order.
You could do the same transformation as "-brightness-contrast bxc" with "-level" or "+level" or "-function polynomial", though these would need different numbers.
The function BrightnessContrastImage() in enhance.c calculates the slope from the contrast, and calculates the intercept from both the brightness and the slope.
So, in the general case, "-brightness-contrast bxc" will be different to "-brightness-contrast bx0 -brightness-contrast 0xc", in either order.
You could do the same transformation as "-brightness-contrast bxc" with "-level" or "+level" or "-function polynomial", though these would need different numbers.
snibgo's IM pages: im.snibgo.com