Input image 1: texture image
Input image 2: .png image file which have a 'deboss' effect
Expected output image with transparent background, deboss effect (not so good as the input image 2, this is best result I can do) and texture:
(I used Photoshop)
how to put a texture on a .png image with transparent background
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: how to put a texture on a .png image with transparent background
Try this:
Code: Select all
convert input-texture.png \
\( out2_a315.png -channel a -negate +channel \) \
\( +clone -alpha extract -negate +write mpr:alpha +delete \) \
-compose multiply -composite \
mpr:alpha -alpha off -compose over -compose copy_opacity -composite \
emboss_texture.png
Re: how to put a texture on a .png image with transparent background
I tried it. below is the output image. Seems like it lost the 'deboss' effect:fmw42 wrote: ↑2019-08-01T22:20:14-07:00 Try this:
Code: Select all
convert input-texture.png \ \( out2_a315.png -channel a -negate +channel \) \ \( +clone -alpha extract -negate +write mpr:alpha +delete \) \ -compose multiply -composite \ mpr:alpha -alpha off -compose over -compose copy_opacity -composite \ emboss_texture.png
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: how to put a texture on a .png image with transparent background
Tell us the steps you uses in PS to create it.
Re: how to put a texture on a .png image with transparent background
In photoshop.
I overlay two layers, push Alt button, and used the 'Mask' to get the effect.
Hi fmw42,
Just find another way to get the expected result, IM should be able to do it..
I used Photoshop, right click layer - layer style - bevel and emboss -out put image. The effect is like below:
Input image:
Output image (with a little 'deboss' effect, more is better:) -
I can not simply use "emboss -a 315 ..." to get the expected image.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: how to put a texture on a .png image with transparent background
try this:
Code: Select all
convert img.png \
\( -clone 0 -alpha extract -morphology dilate diamond:1 -write mpr:alpha +delete \) \
texture.png -compose multiply -composite \
mpr:alpha -alpha off -compose copy_opacity -composite result.png
Re: how to put a texture on a .png image with transparent background
fmw42, It works. Thanks.fmw42 wrote: ↑2019-08-02T21:16:55-07:00 try this:
Code: Select all
convert img.png \ \( -clone 0 -alpha extract -morphology dilate diamond:1 -write mpr:alpha +delete \) \ texture.png -compose multiply -composite \ mpr:alpha -alpha off -compose copy_opacity -composite result.png