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?".
dri
Posts: 3 Joined: 2013-11-25T05:38:44-07:00
Authentication code: 6789
Post
by dri » 2013-11-25T06:09:56-07:00
Hello guys,m can you helpme please?
From this image
To this
The idea is to put the relieve over other equal images with color
Last edited by
dri on 2013-11-28T01:01:16-07:00, edited 1 time in total.
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2013-11-25T12:13:05-07:00
try
convert 52934d34f0c97.png -alpha extract \
-shade 90x45 -fuzz 0.5% -transparent "gray(180)" \
-channel a -evaluate multiply 0.5 +channel result.png
adjust the multiply factor to give the relief more or less contrast
dri
Posts: 3 Joined: 2013-11-25T05:38:44-07:00
Authentication code: 6789
Post
by dri » 2013-11-26T02:30:41-07:00
Thanks for your answer, but:
The effect is similar but is outside the original layer.
I need the effect inside original layer. Inside, over the white color.
How I do this?
fmw42 wrote: try
convert 52934d34f0c97.png -alpha extract \
-shade 90x45 -fuzz 0.5% -transparent "gray(180)" \
-channel a -evaluate multiply 0.5 +channel result.png
adjust the multiply factor to give the relief more or less contrast
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2013-11-26T11:48:00-07:00
Try this. Adjust the morphology erode octagon:1 value as desired to increase the erosion until it suits your requrements). If octagon:1 is too much, start with diamond:1.
convert 52934d34f0c97.png -alpha extract -morphology erode octagon:1 \
-shade 90x45 -fuzz 0.5% -transparent "gray(180)" \
-channel a -evaluate multiply 0.5 +channel result.png
snibgo
Posts: 12159 Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK
Post
by snibgo » 2013-11-26T17:14:57-07:00
It could be done with "-shadow" or more generally with "-blur". But I see the required result has white pixels with varying transparency, and transparent black elsewhere, so it's quite fiddly.
snibgo
Posts: 12159 Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK
Post
by snibgo » 2013-11-26T23:17:18-07:00
This Windows script is close to the desired result.
Code: Select all
convert ^
52934d34f0c97.png ^
-alpha extract ^
-negate ^
( -clone 0 ^
-blur 3x1.5 ^
) ^
-geometry +0+2 ^
-compose Lighten -composite ^
-fill Black -opaque White ^
-channel RGB -evaluate Multiply 0.66 ^
-alpha Copy ^
-channel RGB -evaluate set 100%% ^
e9.png
The main difference is that the desired result has not only pure whites of varying transparency, but also dark pixels of very low transparency.
dri
Posts: 3 Joined: 2013-11-25T05:38:44-07:00
Authentication code: 6789
Post
by dri » 2013-11-27T02:41:46-07:00
snibgo thanks for your effort, you help me a lot.
I tryed your examples and I search the combination of both :_(
The effect I need is exactly your first example, but applied over an image as the second example. The central gray color is the problem.
Like this image. The white lighting and the shadow dark, produce a good 3d effect