public static function opacity($image, $opacity)
{
// Determine opacity
$opacity = Helper::opacity($opacity);
$width = imagesx($image);
$height = imagesy($image);
$newImage = imagecreatetruecolor($width, $height);
// Set a White & Transparent Background Color
$bg = imagecolorallocatealpha($newImage, 0, 0, 0, 127);
imagefill($newImage, 0, 0, $bg);
// Copy and merge
Helper::imageCopyMergeAlpha($newImage, $image, array(0, 0), array(0, 0), array($width, $height), $opacity);
imagedestroy($image);
return $newImage;
}