to manipulate the border
first use the inline css from your img
like <img src="imgs src" style="border:4px solid black" id="testImg"/>
then from the botton where the onclick happen for example on expand border
<input type="button" value="expand image" onclick='document.getElementById("testImg").style.borderWidth =
//and for the reduce border: the same script but use the division operand '/'