Archive

Posts Tagged ‘dynamic image border’

Making Border Image with PHP and GD Library

October 27th, 2008 Admin 3 comments

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 point

y1
y-coordinate for first point

x2
x-coordinate for second point

y2
y-coordinate for second point

color
The line color. A color identifier created with imagecolorallocate()

Read more…