Page 2 of 2

Re: photo effect - Warholize - line art

Posted: 2011-02-18T11:20:05-07:00
by fmw42
If you want to use your method with a color image (rather than convert to grayscale), then try this

Image

convert \( birdofparadise.jpg -resize 50% \) \
\( -clone 0 -modulate 100%,100%,15% \) \
\( -clone 0 -modulate 100%,100%,55% \) \
\( -clone 0 -modulate 100%,100%,95% \) \
\( -clone 0 -modulate 100%,100%,145% \) \
-delete 0 miff:- | \
montage miff:- -tile 2x2 -geometry +5+5 -background white \
birdofparadise_warhol.jpg

Image


NOTE hue=95% is nearly 100% which is no change from the original input. So you might as well avoid the extra step for 95% and do


convert \( birdofparadise.jpg -resize 50% \) \
\( -clone 0 -modulate 100%,100%,0% \) \
\( -clone 0 -modulate 100%,100%,50% \) \
\( -clone 0 -modulate 100%,100%,150% \) \
-swap 0,1 -swap 1,2 miff:- | \
montage miff:- -tile 2x2 -geometry +5+5 -background white \
birdofparadise_warhol2.jpg


Image

Re: photo effect - Warholize - line art

Posted: 2011-02-23T06:32:14-07:00
by Tagomago
Thanks, that looks quite good. Dithering to 3 colors worked nicely for me as well.

Re: photo effect - Warholize - line art

Posted: 2011-03-02T21:15:19-07:00
by fmw42
Here is reducing colors to 10


convert \( birdofparadise.jpg -resize 50% +dither -colors 10 \) \
\( -clone 0 -modulate 100%,100%,0% \) \
\( -clone 0 -modulate 100%,100%,50% \) \
\( -clone 0 -modulate 100%,100%,150% \) \
-swap 0,1 -swap 1,2 miff:- | \
montage miff:- -tile 2x2 -geometry +5+5 -background white \
birdofparadise_warhol3.jpg

Image


Here is reducing to 3 colors:


convert \( birdofparadise.jpg -resize 50% +dither -colors 3 \) \
\( -clone 0 -modulate 100%,100%,0% \) \
\( -clone 0 -modulate 100%,100%,50% \) \
\( -clone 0 -modulate 100%,100%,150% \) \
-swap 0,1 -swap 1,2 miff:- | \
montage miff:- -tile 2x2 -geometry +5+5 -background white \
birdofparadise_warhol4.jpg

Image

Re: photo effect - Warholize - line art

Posted: 2011-03-03T17:01:44-07:00
by anthony
The above shows one aspect of the current 'color reduction' or 'quantization' function that is currently built into IM. It tends to generate colors which are in the middle of each of the regions of the colors selected. However it does have an optimization that will have it select colors that are used a lot (for cartoon like images).

That is to say in a typical photo with heavy color reduction, you tend to get flat, midtone colors. rather than bright primary/secondary colors.

Eventually I would like to see IM have the ability to select from a number of different color reduction methods.

See http://www.imagemagick.org/Usage/quanti ... _not_exact

Re: photo effect - Warholize - line art

Posted: 2011-03-04T10:17:24-07:00
by myspacee
hello,
see that post grow day by day. So, any chance to have something working for windows user ?

Thank you all for support,

m.

Re: photo effect - Warholize - line art

Posted: 2011-03-04T10:53:51-07:00
by fmw42
The command lines above should easily translate into windows. Though you might have to make it into two command lines as I don't know if the pipe feature of Unix goes over to Windows. I am not a windows user. But just remove the \ before ( and ) and use ^ rather than \ for continuations to next line. And escape % with %%. See http://www.imagemagick.org/Usage/windows/ Perhaps, some kind windows user could translate this here for you.

Re: photo effect - Warholize - line art

Posted: 2011-03-06T14:48:38-07:00
by myspacee
Confirm easy conversion for lines above.

Code: Select all

convert ( test.jpg -resize 50%% +dither -colors 10 ) ( -clone 0 -modulate 100%%,100%%,0%% ) ( -clone 0 -modulate 100%%,100%%,50%% ) ( -clone 0 -modulate 100%%,100%%,150%% ) -swap 0,1 -swap 1,2 miff:- | montage miff:- -tile 2x2 -geometry +10+5 -background white birdofparadise_warhol3.jpg
maybe not so Warlhol as i hope, but thank you all, as usual.

m.

Re: photo effect - Warholize - line art

Posted: 2011-03-06T16:25:50-07:00
by anthony
You may be able to make the colors more glaringly by increasing the saturation using the -modulate operation.
http://www.imagemagick.org/Usage/colors_mods/#modulate

Re: photo effect - Warholize - line art

Posted: 2011-03-06T20:06:51-07:00
by fmw42
anthony wrote:You may be able to make the colors more glaringly by increasing the saturation using the -modulate operation.
http://www.imagemagick.org/Usage/colors_mods/#modulate

convert \( birdofparadise.jpg -resize 50% +dither -colors 3 \) \
\( -clone 0 -modulate 100%,200%,0% \) \
\( -clone 0 -modulate 100%,200%,50% \) \
\( -clone 0 -modulate 100%,200%,150% \) \
-swap 0,1 -swap 1,2 miff:- | \
montage miff:- -tile 2x2 -geometry +5+5 -background white \
birdofparadise_warhol5.jpg

Image