1
0
mirror of https://github.com/Intervention/image.git synced 2025-09-03 10:53:01 +02:00

alpha is now parsed by parseColor

This commit is contained in:
Oliver Vogel
2013-03-18 13:22:34 +01:00
parent 13833dd9ff
commit 5b6ecf0461

View File

@@ -665,7 +665,7 @@ class Image
/** /**
* Insert another image on top of the current image * Insert another image on top of the current image
* *
* @param string $file * @param mixed $file
* @param integer $pos_x * @param integer $pos_x
* @param integer $pos_y * @param integer $pos_y
* @return Image * @return Image
@@ -1029,7 +1029,10 @@ class Image
} elseif(is_array($value)) { } elseif(is_array($value)) {
// parse color array like: array(155, 155, 155) // parse color array like: array(155, 155, 155)
list($r, $g, $b) = $value; list($r, $g, $b, $a) = $value;
// set alpha if available (A value between 0 [opaque] and 127 [transparent])
$alpha = is_numeric($a) ? intval($a) : $alpha;
} elseif(is_string($value)) { } elseif(is_string($value)) {