Fred's bevel script: Is this output as per expectation?

A plethora of command-line scripts that perform geometric transforms, blurs, sharpens, edging, noise removal, and color manipulations.
Post Reply
User avatar
plug.gulp@gmail.com
Posts: 3
Joined: 2012-05-08T17:45:36-07:00
Authentication code: 13

Fred's bevel script: Is this output as per expectation?

Post by plug.gulp@gmail.com » 2012-07-11T17:04:00-07:00

I have these two png images, both have transparent background:

A. Square in Top-left corner of the image within the bounds of the image (the image boundaries are visible when you select the image using the mouse):
Image

B. Rectangle inside the image bounds without touching image boundaries (the image boundaries are visible when you select the image using the mouse):
Image

When I run Fred's bevel script on both of the above images, the output is as follows:

A. Output of the bevel script using the first image above as input:
Image

B. Output of the bevel script using the second image above as input:
Image

I run the script as follows for both the input images, i.e. with the default parameters:

./bevel input_img.png out_img.png

Shouldn't there be "bright" bevel edges at the top and right side of the output image A, similar to the bright edges that appear on the output image B? It looks like the bright bevel edges span the whole image upto the dark bevel edges at the right and bottom side of the rectangle.

Thanks and regards,

Plug

User avatar
fmw42
Posts: 25414
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Fred's bevel script: Is this output as per expectation?

Post by fmw42 » 2012-07-11T18:23:52-07:00

Shouldn't there be "bright" bevel edges at the top and right side of the output image A, similar to the bright edges that appear on the output image B? It looks like the bright bevel edges span the whole image upto the dark bevel edges at the right and bottom side of the rectangle.
There will only be bevel on every side, when the alpha channel extends outside the boundary of the red area. Thus you need to add a border of transparent to your image before processing and then trim off the border afterwards. See
http://www.imagemagick.org/Usage/crop/#extent
http://www.imagemagick.org/Usage/crop/#shave

Sorry it was not designed to auto pad the image. When I get some time, I will try to add that feature. But I am very busy now and don't know when I will get to it. See the example on the bevel page. Look at the alpha channel and the image without the alpha channel to get a better idea what the script is doing. If you want to bevel outside the image, see IM montage for one image. It can add a bevel frame outside the image.

However, if you just want a beveled border, see the script, bevelborder, at the link below. But it bevels inside the image, not extra bevel on the outside of the image. But that may be what you want anyway.

Post Reply