[TYPO3-dev] Using GIFbuilder from PHP
Oliver Klee
typo3-german-01 at oliverklee.de
Wed Apr 5 00:18:19 CEST 2006
Hi,
for an front-end plugin extension, I need to convert images to greyscale
and rescale them. For this, I use the GIFbuilder like this:
[snip]
$gifBuilderConf['file'] = 'GIFBUILDER';
$gifBuilderConf['file.'] = array();
$gifBuilderConf['file.'][10] = 'IMAGE';
$gifBuilderConf['file.']['10.'] =& $imageConf;
$gifBuilderConf['file.'][20] = 'EFFECT';
$gifBuilderConf['file.']['20.'] = array();
$gifBuilderConf['file.']['20.']['value'] = 'gray';
$gifBuilderConf['file.'][30] = 'SCALE';
$gifBuilderConf['file.']['30.'] = array();
$gifBuilderConf['file.']['30.']['width'] = $width;
$gifBuilderConf['file.']['30.']['height'] = $height;
$currentImageCode = $this->cObj->IMAGE($gifBuilderConf);
[snip]
($width, $height and $imageConf are dynamically calculated/created.)
Displaying the image and converting it to greyscale works fine, but
scaling does not: The image gets cut off instead of rescaled. Is this a
bug in the GIFbuilder or am I doing something wrong? The TSref is a bit
anemic concerning this problem.
I'll appreciate any help.
Thanks a lot in advance,
Oliver
More information about the TYPO3-dev
mailing list