Re: Add border to image
Posted by
Michael Schmid on
URL: http://imagej.273.s1.nabble.com/Add-border-to-image-tp3704047p5015216.html
Hi Tycho,
for a transparent border, you could try something like this
b = 3; //border width
w = getWidth();
h = getHeight();
makeRectangle(b, b, w-2*b, h-2*b);
run("Make Inverse");
run("Multiply...", "value=0.5");
run("Select None");
To change the brightness of the border you can also add some number after 'Multiply', see Process>Math>Add. Assuming it's an 8-bit or RGB image, suitable numbers are between 1 and 128.
Use the Command Recorder (Plugins>Macros>Record) to determine the macro command for adding.
Michael
________________________________________________________________
On Dec 10, 2015, at 21:34, ajaytechie07 wrote:
> Hi,
> Could you please tell me how to make this border transparent.
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html