You are here

function imageapi_gd_image_overlaytext in ImageCache Actions 5.3

Same name and namespace in other branches
  1. 5.2 imagecache_canvasactions.module \imageapi_gd_image_overlaytext()

Place text on an image.

File

./imagecache_canvasactions.module, line 159
A collection of canvas (layer) type manipulations for imagecache - including "Watermark"

Code

function imageapi_gd_image_overlaytext(&$image, $text, $size = 12, $x = 0, $y = 0, $RGB, $fontfile = 'MgOpenModernaBold', $angle = 0) {
  $color = imagecolorallocate($image->resource, $RGB['red'], $RGB['green'], $RGB['blue']);
  imagettftext($image->resource, $size, $angle, $x, $y, $color, $fontfile, $text);
  return TRUE;
}