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?".
romeo1
Posts: 7 Joined: 2018-07-30T21:34:53-07:00
Authentication code: 1152
Post
by romeo1 » 2018-07-30T21:47:47-07:00
I want to create a mockup as the same image below:
Thank you for your help!
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2018-07-30T22:34:22-07:00
Please always provide your ImageMagick version and platform!
Here is one way to make an inner shadow effect. Unix syntax.
Code: Select all
convert bur1.png \
\( -clone 0 -alpha off -negate \) \
\( -clone 0 -alpha extract \) \
-delete 0 \
\( -clone 1 -background black -motion-blur 0x15-135 \) \
\( -clone 0,2,1 -compose multiply -composite \) \
-delete 0,2 \
+swap -alpha off -compose copy_opacity -composite \
\( n1.jpg -resize 50% \) +swap -gravity center -compose multiply -composite n1_bur1_innershadow.png
romeo1
Posts: 7 Joined: 2018-07-30T21:34:53-07:00
Authentication code: 1152
Post
by romeo1 » 2018-07-31T00:04:30-07:00
Thanks bro. I am using ImageMagick version 6 on Linux OS.
I ran your script but result not exactly as I expected : "WOOD ENGRAVED" effect
Expected:
Please help me. Many thanks!
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2018-07-31T16:53:47-07:00
Try this:
Code: Select all
convert bur1.png \
\( -clone 0 -alpha off -negate \) \
\( -clone 0 -alpha extract -write mpr:alpha \) \
-delete 0 \
\( -clone 1 -background black -motion-blur 0x15-135 \) \
\( -clone 0,2,1 -compose multiply -composite \) \
-delete 0,2 \
+swap -alpha off -compose copy_opacity -composite \
\( n1.jpg -resize 50% +write mpr:img -brightness-contrast -50,0 \) +swap -compose multiply -composite \
mpr:img +swap mpr:alpha -compose over -composite \
n1_bur1_innershadow2.png
Or using -modulate rather than -brightness-contrast, so we can change the hue slightly reddish
Code: Select all
convert bur1.png \
\( -clone 0 -alpha off -negate \) \
\( -clone 0 -alpha extract -write mpr:alpha \) \
-delete 0 \
\( -clone 1 -background black -motion-blur 0x15-135 \) \
\( -clone 0,2,1 -compose multiply -composite \) \
-delete 0,2 \
+swap -alpha off -compose copy_opacity -composite \
\( n1.jpg -resize 50% +write mpr:img -modulate 30,100,95 \) +swap -compose multiply -composite \
mpr:img +swap mpr:alpha -compose over -composite \
n1_bur1_innershadow3.png
romeo1
Posts: 7 Joined: 2018-07-30T21:34:53-07:00
Authentication code: 1152
Post
by romeo1 » 2018-07-31T19:04:03-07:00
Many thanks for your support!
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2018-07-31T20:03:04-07:00
If you have a second darker wood grain image, that could be used for the engraved parts.
romeo1
Posts: 7 Joined: 2018-07-30T21:34:53-07:00
Authentication code: 1152
Post
by romeo1 » 2018-07-31T21:19:48-07:00
Mr fmw42 , how can i adjustment position of logo image? I using -geometry but not work.
Last edited by
romeo1 on 2018-08-01T01:34:55-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 » 2018-08-01T13:11:20-07:00
Try this variation that moves the engraving to the center. You should be able to change the gravity and include a -geometry offset.
Code: Select all
convert \( bur1.png -alpha extract -write mpr:alpha \) \
\( -clone 0 -background black -motion-blur 0x15-135 \) \
\( -clone 0,1 -compose multiply -composite \) \
-delete 1 \
+swap -alpha off -compose copy_opacity -composite \
\( n1.jpg -resize 50% +write mpr:img -modulate 30,100,95 \) \
-compose multiply -composite \
mpr:alpha -alpha off -compose copy_opacity -composite \
mpr:img +swap -gravity center -compose over -composite \
n1_bur1_innershadow4a.png
romeo1
Posts: 7 Joined: 2018-07-30T21:34:53-07:00
Authentication code: 1152
Post
by romeo1 » 2018-08-01T20:18:14-07:00
Thanks my idol!
romeo1
Posts: 7 Joined: 2018-07-30T21:34:53-07:00
Authentication code: 1152
Post
by romeo1 » 2018-08-02T02:02:28-07:00
Please help me If i want using a second darker wood grain image for the engraved parts.
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2018-08-02T11:23:35-07:00
try this:
Code: Select all
convert \( bur1.png -alpha extract -write mpr:alpha \) \
\( -clone 0 -background black -motion-blur 0x15-135 \) \
\( -clone 0,1 -compose multiply -composite \) \
-delete 1 \
+swap -alpha off -compose copy_opacity -composite \
\( 001.jpg -resize 50% \) -compose multiply -composite \
mpr:alpha -alpha off -compose copy_opacity -composite \
\( n1.jpg -resize 50% \) +swap -gravity center -compose over -composite \
n1_bur1_innershadow5.png