Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Thx to http://migre.me/9ZqmJ :) */
- function drawBorder(&$img, &$color, $thickness = 1)
- {
- $x1 = 0;
- $y1 = 0;
- $x2 = imagesx($img) - 1;
- $y2 = imagesy($img) - 1;
- for($i = 0; $i < $thickness; $i++)
- {
- imagerectangle($img, $x1++, $y1++, $x2--, $y2--, $color);
- }
- }
- $verde = imagecolorallocate($img,0,255,0);
- drawBorder($img, $verde, 3);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement