=$widthSecondline) { $newwidth = ($widthFirstline); } else { $newwidth = ($widthSecondline); } $im = imagecreatetruecolor($newwidth, 70); $black = imagecolorallocatealpha($im, 33, 33, 33, 127); $white = imagecolorallocate($im, 255, 255, 255); // Set the background imagefilledrectangle($im, 0, 0, $newwidth+41, 69, $black); // Write it imagettftext($im, 18, 0, 10, 30, $white, $font, $emailTitle); // Write it imagettftext($im, 10, 0, 10, 50, $white, $font, $emailSubtitle); $orimage = 'files/thumbs/'.$filename.'.640.250.'.$extension; $img = 'files/thumbs/temp_'.$filename.'.640.250.'.$extension; $image = imagecreatetruecolor(640, 250); $image = imagecreatefromjpeg($orimage); imagecopymerge($image, $im, 0, 10, 0, 0, $newwidth, 70, 80); imagejpeg($image, $img, 100); imagedestroy($im); imagedestroy($image); $emailVisual = 'temp_'.$emailVisual; $emailTemplateName = $nieuwsbrief['Template']; $emailTemplateStylesheet = PRODUCT_EMAILTEMPLATES.'/'.$emailTemplateName.'/stylesheet.php'; $emailTemplateHtml = PRODUCT_EMAILTEMPLATES.'/'.$emailTemplateName.'/template.php'; include($emailTemplateStylesheet); $emailContent .= updatePtags($nieuwsbrief['Text'], $emailStyles); include($emailTemplateHtml); $emailComplete = checkHtml($emailComplete, $emailTemplateHtml); echo $emailComplete; ?>