Making Border Image with PHP and GD Library
As i know, PHP don’t have a function to create image border directly. So, how to make border image if PHP doesn’t have it? We must set manually using imageline function that already have in PHP since version 4 built in GD library. Before we go, we need to describe what is image border. That is a line in all side of image, top, right, bottom, and left.
Imageline function just allowed us to draw a single line between two given points. The parameters are :
image
An image resource, returned by one of the image creation functions, such as imagecreatetruecolor().x1
x-coordinate for first pointy1
y-coordinate for first pointx2
x-coordinate for second pointy2
y-coordinate for second pointcolor
The line color. A color identifier created with imagecolorallocate()