convert's equivalent to (gimp-brightness-contrast)
Posted: 2010-01-04T10:42:40-07:00
Hi all!
How can I emulate GIMP's (gimp-brightness-contrast) using ImageMagick's convert?
I have the following GIMP script, which I've wrapped in a gimp-console:
The values of brightness and contrast should be settable. Reading from
the GIMP documentation:
<<<
This procedures allows the brightness and contrast of the specified
drawable to be modified. Both 'brightness' and 'contrast' parameters
are defined between -127 and 127."
>>>
And you can find the source for it here:
http://www.koders.com/c/fid5EF9F42E3382 ... ontrast#L1
Regards and thanks in advance,
Shlomi Fish.
How can I emulate GIMP's (gimp-brightness-contrast) using ImageMagick's convert?
I have the following GIMP script, which I've wrapped in a gimp-console:
Code: Select all
(let*
((in-fn "Input.bmp")
(out-fn "Input_out.bmp")
(brightness -90)
(contrast 116)
(img (car (gimp-file-load 1 in-fn in-fn)))
(drawable (car (gimp-image-get-active-drawable img))))
(gimp-brightness-contrast drawable brightness contrast)
(if (not (car (gimp-drawable-is-gray drawable)))
(gimp-image-convert-grayscale img))
(gimp-file-save 1 img drawable out-fn out-fn))
the GIMP documentation:
<<<
This procedures allows the brightness and contrast of the specified
drawable to be modified. Both 'brightness' and 'contrast' parameters
are defined between -127 and 127."
>>>
And you can find the source for it here:
http://www.koders.com/c/fid5EF9F42E3382 ... ontrast#L1
Regards and thanks in advance,
Shlomi Fish.