In the Rule & Dash palette in Fred4, select a color for the border from the list of colors.
Type the weight value and then click the confirmation icon.
To remove a border from a image, enter 0 as the border weight.
Notes
You can also set automatic border for all new images. To do it, on the Edit menu, click Preferences, click Rules weight setup, and then, under Default weights, enter an appropriate value in Images.
Note: you cannot select the color for the borders, just the weight. Keep the value as 0 not to have a border.
If you set the automatic border, all ads will have the border too!
By scripting
To set an outside border on an image, for example, with 3pt weight and magenta color, use this script:
page.objsetborderweight (units.toval("3pt"))
page.objsetbordercolor ("M",100)
page.objsetruleposition (1)
The border is applied on the image.