[TYPO3-dev] Using the t3lib_stdgraphic class to combine multiple images and send by email
Brian Bendtsen
bb at bellevuevej.dk
Thu May 6 15:32:54 CEST 2010
Hi
I need to send an email with a GIFBUILDER image using a cronjob. What I
actually need is to combine 2 images. I have been studying the
t3lib_stdgraphic class and it looks like there are a few methods I can use.
I have tried to experiment with this class for a while now, and I can't
wrap my head around, how to fetch my rendered image.
Here is some of my code, where I try to create an image with a blue box:
--- begin ---
$imgObj = t3lib_div::makeInstance('t3lib_stdgraphic');
$imgObj->init();
$imgObj->tempPath = PATH_site.$imgObj->tempPath;
$imgRes = $imgObj->imagecreate('567','415');
$imgConf = array();
$imgConf['dimensions'] = "0,0,50,50";
$imgConf['color'] = "blue";
$imgObj->makeBox($imgRes, $imgConf, '0,0,567,415');
$imgObj->ImageWrite($imgRes, 'myImage.jpg', 1);
--- end ---
The ImageWrite function returns a boolean of 1, which means its a
success I guess, but I can't figure out how to get the image path.
Maybe I'm way off. Any hints are appreciated :)
/BB
More information about the TYPO3-dev
mailing list