function watermark::_get_image_color in ImageCache Actions 8
Same name and namespace in other branches
- 5.3 watermark.inc \watermark::_get_image_color()
- 5.2 watermark.inc \watermark::_get_image_color()
- 6.2 watermark.inc \watermark::_get_image_color()
- 6 watermark.inc \watermark::_get_image_color()
- 7 watermark.inc \watermark::_get_image_color()
TODO
Parameters
resource $image:
int $r:
int $g:
int $b:
int $alpha:
Return value
int
1 call to watermark::_get_image_color()
- watermark::create_watermark in ./
watermark.inc - TODO
File
- ./
watermark.inc, line 105 - Routine for image layering.
Class
- watermark
- @file Routine for image layering.
Code
function _get_image_color($image, $r, $g, $b, $alpha) {
$c = imagecolorexactalpha($image, $r, $g, $b, $alpha);
if ($c != -1) {
return $c;
}
// @todo: this now uses imagecolorallocatealpha(): test
$c = imagecolorallocatealpha($image, $r, $g, $b, $alpha);
if ($c != -1) {
return $c;
}
// @todo: this now uses imagecolorclosestalpha(): test
return imagecolorclosestalpha($image, $r, $g, $b, $alpha);
}