Changing the thickness of the brush
Starting with the default brush, the most straightforward modification is to change the thickness of the brush. This modification is accomplished using the imagesetthickness() function

imagesetthickness($img_r, $thickness);