If you want to use your method with a color image (rather than convert to grayscale), then try this
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
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
photo effect - Warholize - line art
Re: photo effect - Warholize - line art
Thanks, that looks quite good. Dithering to 3 colors worked nicely for me as well.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: photo effect - Warholize - line art
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
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
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
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
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: photo effect - Warholize - line art
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
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
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: photo effect - Warholize - line art
hello,
see that post grow day by day. So, any chance to have something working for windows user ?
Thank you all for support,
m.
see that post grow day by day. So, any chance to have something working for windows user ?
Thank you all for support,
m.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: photo effect - Warholize - line art
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
Confirm easy conversion for lines above.
maybe not so Warlhol as i hope, but thank you all, as usual.
m.
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
m.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: photo effect - Warholize - line art
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
http://www.imagemagick.org/Usage/colors_mods/#modulate
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: photo effect - Warholize - line art
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