![Image](http://img50.imageshack.us/img50/9964/btrvadelappendedpl4.png)
![Image](http://img50.imageshack.us/img50/7720/btrvadelborderyi3.png)
How do you expand the mask so that the border around the objects is exactly one pixel? It's easy to expand the mask itself by one pixel, but it's not the same. I don't think I can even do it using trigonometry, as each object is a different size and doesn't have a regular shape.anthony wrote:Now you need to expand that mask by the thickness of the border you want to add. You can blur it then adjust the transparency of the result to create a nice fuzzy / anti-aliased border. Just how fuzzy and thick it is depends on your blur and semi-transparency adjustments.
Expand the mask, and convert it into a shape which you can then underlay under the original image.SharkD wrote: How do you expand the mask so that the border around the objects is exactly one pixel? It's easy to expand the mask itself by one pixel, but it's not the same. I don't think I can even do it using trigonometry, as each object is a different size and doesn't have a regular shape.
That doesn't answer my question.anthony wrote:Expand the mask, and convert it into a shape which you can then underlay under the original image.SharkD wrote: How do you expand the mask so that the border around the objects is exactly one pixel? It's easy to expand the mask itself by one pixel, but it's not the same. I don't think I can even do it using trigonometry, as each object is a different size and doesn't have a regular shape.
Code: Select all
convert http://imagemagick.org/Usage/images/hand_point.gif \
-bordercolor none -border 4x4 hand.gif
Code: Select all
convert hand.gif -fill black -colorize 100% hand_shape.png
Code: Select all
convert hand_shape.png -channel RGBA -blur 0x4 hand_blur.png
Code: Select all
convert hand_blur.png -channel A -threshold 80% hand_exp.png
Code: Select all
convert hand_exp.png hand.gif -composite hand_bordered.gif