Help with filtering!!!

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
danigonza
Posts: 1
Joined: 2014-08-27T06:55:23-07:00
Authentication code: 6789

Help with filtering!!!

Post by danigonza »

Hi to all the community!!!

I need a little help to transform this type of image :

Image

To this one:

Image

Which is type of transformation, mask that i need to apply to accomplish that??

Thanks in advance!!!!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Help with filtering!!!

Post by fmw42 »

Please always identify your version of IM and platform


try this.

unix syntax

# find the two colors

Code: Select all

convert imagemagicklpreliminar.png -format "%[pixel:u.p{0,0}]" info:
srgb(91,155,213)

convert imagemagicklpreliminar.png -flop -format "%[pixel:u.p{0,0}]" info:
srgb(237,125,49)
# process image

Code: Select all

convert imagemagicklpreliminar.png -channel red -separate +channel -auto-level -threshold 50% -write show: \
+level-colors "srgb(91,155,213),srgb(237,125,49)" show:
or

Code: Select all

convert imagemagicklpreliminar.png -fuzz 40% \
-fill "srgb(91,155,213)" -opaque "srgb(91,155,213)" \
-fill "srgb(237,125,49)" -opaque "srgb(237,125,49)" \
result.png
adjust the fuzz value as desired
Post Reply