Page 1 of 1

I would like to achieve this effect with imagemagick

Posted: 2013-01-20T19:24:24-07:00
by lovelf
Please see this photo,

Image

I would like to replicate the three colors band over an image, turning any image into such jamaican "bob marley" effect.

It would be a red taken out of that image, a yellow, and a green.

I don't know what else is in there besides the color application in what seems to be three equal parts, in the direction of red, yellow and green.
Or about 40% yellow, 30% red and 30% green or a bit less of green, I would have to measure really and post back shortly.

Maybe it has to be turned to grayscale first as the face does not seem to have much color, also I wouldn't know how to preserve the black apparently or dark tones, as it seems the hair, eye lashes, moustache and part of the upper lip and textures of the ears were retained and the yellow did not overlap onto these, nor did the red or green, these seem background.

Thank you

Re: I would like to achieve this effect with imagemagick

Posted: 2013-01-20T23:58:44-07:00
by snibgo
It's hard to tell from such a small image, but I would consider it to have three layers: a background (red, yellow and green sripes), a photograph thresholded to black and white, with the white then made transparent, and text. The three layers are then merged.

Does that make sense? Can you now see how to make it?

Re: I would like to achieve this effect with imagemagick

Posted: 2013-01-21T18:05:51-07:00
by lovelf
I'm stuck,
I've reproduced the flag:

Code: Select all

convert -size 300x800 xc:#b32b2c red.png
convert -size 300x800 xc:#fedb01 yellow.png
convert -size 300x800 xc:#37a754 green.png

convert red.png yellow.png green.png +append flag.png
now how do I merge into image.png this flag, and before doing that, how do I go about turning it black and white with the threshold, thank you

I don't need the label

I think I've done it wrong though as the flag should not have been done separately, instead those transformations should have been applied to the original image after making it black and white like you said, I don't know how to do this.

Re: I would like to achieve this effect with imagemagick

Posted: 2013-01-21T20:12:23-07:00
by fmw42
1)create your 3 color background

2)create a thresholded image

convert image -threshold XX% output

You find the best threshold % as desired for appearance

3)overlay the thresholded image onto your 3 color background

convert backgroundimage thresholdedimage -compose multiply -composite resultimage