[TYPO3-dev] Typo3 create dynamic image from gd..

ravindra lokhande ravindra at humdingertech.com
Tue Jan 15 12:26:52 CET 2008


Hello friends, i am new to typo3. i want to create image 	
i have written code : 
                                        header("Content-type: image/png");
					
				 	// Create the image
					 $im = imagecreatetruecolor(800, 30);
					
					// Create some colors
					 $white = imagecolorallocate($im, 255, 255, 255);
					 $grey = imagecolorallocate($im, 128, 128, 128);
					 $black = imagecolorallocate($im, 0, 0, 0);
					 imagefilledrectangle($im, 0, 0, 799, 29, $white);
					
				 	$text = 'Wir bieten eine einzigartige Kombination aus Branchen- und
IT-Wissen. Wir sprechen Ihre Sprache.';
				 		//$font = 'C://WINDOWS/Fonts/arial.ttf';
					$font = 'arial.ttf';
					
					// Add some shadow to the text
					//imagettftext($im, 11, 0, 11, 21, $grey, $font, $text);
					
					// Add the text
					imagettftext($im, 11, 0, 10, 20, $black, $font, $text);
					
					// Using imagepng() results in clearer text compared with imagejpeg()
					imagepng($im);
					imagedestroy($im);

but it gives error: header already sent. 
If there is a ready function in TYPO3, please tell me. i will be thankful.

-- 
View this message in context: http://www.nabble.com/Typo3-create-dynamic-image-from-gd..-tp14837852p14837852.html
Sent from the TYPO3 Dev mailing list archive at Nabble.com.





More information about the TYPO3-dev mailing list