I'm trying to blend two images, removing the green channel of one of them.
I'm trying to take this image:
And make it look like this:
I'm doing it in Photoshop by laying this over the original image:
And then in Blending Options removing the green channel of that green layer, like this (note the checkbox for Green is unchecked - that's the only change being made on this panel):
Does anyone have any hints about how I might achieve such a thing in ImageMagick?
Thanks for any help.
Question about blending two images
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Question about blending two images
this should be pretty close
convert Clipboard01.jpg -colorspace gray -auto-level +level-colors black,green1 Clipboard01_test1.jpg
see
http://www.imagemagick.org/Usage/color_ ... vel-colors
convert Clipboard01.jpg -colorspace gray -auto-level +level-colors black,green1 Clipboard01_test1.jpg
see
http://www.imagemagick.org/Usage/color_ ... vel-colors
Re: Question about blending two images
Code: Select all
convert Clipboard01.jpg -colorspace gray -auto-level +level-colors black,green1 Clipboard01_test1.jpg
Is there some simple way to brighten it a bit? That produces this:
And I'd like to get it closer to this:
Or maybe brightness isn't the method I should be using?
I posted the test image and the target if anyone wants to play with the source images themselves:
http://sinkingsensation.com/stuff/tests/tests.zip
Re: Question about blending two images
For anyone else coming down this path, this does a pretty good job of finishing the transformation:
Code: Select all
convert test2.jpg -modulate 185% test3.jpg
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Question about blending two images
I think you typed green and it needs to be green1. With green1, I get the same brightness as you had desired.
In IM, pure green is green1.
see
http://www.imagemagick.org/script/color.php
If that does not work, then what version of IM are you using? If old, consider upgrading as it works fine for me using green1 in IM 6.7.3.2 Q16 Mac OSX Tiger. It is possible that you have an old version of IM before -auto-level. If so try using -contrast-stretch 0 in place of -auto-level.
In IM, pure green is green1.
see
http://www.imagemagick.org/script/color.php
If that does not work, then what version of IM are you using? If old, consider upgrading as it works fine for me using green1 in IM 6.7.3.2 Q16 Mac OSX Tiger. It is possible that you have an old version of IM before -auto-level. If so try using -contrast-stretch 0 in place of -auto-level.
Re: Question about blending two images
> I think you typed green and it needs to be green1.
Wow and thanks, you're right, I copied it incorrectly. Perfect now.
Wow and thanks, you're right, I copied it incorrectly. Perfect now.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Question about blending two images
For a 'pure RGB green' I generally recommend using the color name "lime".
The reason "green" is so dark is that it is the SVG defination of "green" and not the X11 defination of "green".
See IM examples, Color Basics, Color Name Conflicts
http://www.imagemagick.org/Usage/color_ ... _conflicts
The reason "green" is so dark is that it is the SVG defination of "green" and not the X11 defination of "green".
See IM examples, Color Basics, Color Name Conflicts
http://www.imagemagick.org/Usage/color_ ... _conflicts
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Question about blending two images
I believe that lime and green1 are identical. see http://www.imagemagick.org/script/color.php
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Question about blending two images
It is.fmw42 wrote:I believe that lime and green1 are identical. see http://www.imagemagick.org/script/color.php
However color names that are followed by numbers are not generally regarded as a good thing, unless you are actually after a pre-prepared 4 color gradient. For example: khaki1, khaki2, kahki3, kahki4
The main reason for that is that the number '1' color does not always correspond to the X11 color name. In some cases none of the colors in the numbered gradient actually directly match the color without a number. For example "khaki" does not directly match any of the colors "khaki1" to "kahki4" though "khaki" is almost identical to "khaki2".
Code: Select all
convert -list color | grep khaki
khaki rgb(240,230,140) SVG X11 XPM
khaki1 rgb(255,246,143) X11
khaki2 rgb(238,230,133) X11
khaki3 rgb(205,198,115) X11
khaki4 rgb(139,134,78) X11
ASIDE: gray50 is a perfect 50% gray color, but only if you restrict yourself to 24 bit colors (8 bit depth). It is not the same as a perfect 16 bit depth gray which you can get using gray(50%), whcih can be important for some mathematical image processing such as composition lighting effects, and other image mapping, and FFT.
That is to say even the gray# numbers are not always good enough either!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/