First, I've searched the forum and docs but I can't find a similar question to mine. I hope you all can help me.
I want to add an semi-transparent surrounding inner-border of 20 pixels (for example) to a single jpg image. With -shave and -border I've created the inner border effect already, but I've lost all image information "under" the border then. Transparency will not succeed anyhow then.
Things that crossed my mind to solve this (but need help in the right direction):
- Create a transparent image (with the same size as original), give that the -shave and -border commands and create a composition with -blend over the original.
- Create 4 transparent boxes as borders (but I think it should be much more easier)
I think this should not be as hard as it seems, but I can't find a way to get started.
Thanks!
Add semi-transparent inner border over source image
-
- Posts: 13
- Joined: 2013-08-09T01:20:06-07:00
- Authentication code: 6789
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Add semi-transparent inner border over source image
It could be something like this Windows BAT script:
Instead of "-bordercolor None -mattecolor brown -frame 20x20", do whatever you want.
Code: Select all
convert ^
logo: ^
( +clone -alpha Transparent ^
-shave 20x20 ^
-bordercolor None ^
-mattecolor brown -frame 20x20 ^
-channel A -evaluate Multiply 0.75 ^
) ^
-composite ^
t.png
snibgo's IM pages: im.snibgo.com
-
- Posts: 13
- Joined: 2013-08-09T01:20:06-07:00
- Authentication code: 6789
Re: Add semi-transparent inner border over source image
Thanks snibgo, exactly as I needed! This proves again this forum is a great way of IM support