Issue Bug Closed

#43624Gifbuilder cannot generate images

torsten wolter 12/05/12, 12:54 updated 10/23/17, 22:16

Description

Gifbuilder does not render images correctly. This problem happens no matter if Gifbuilder is used from extensions or from TypoScript (for an example with pure TypoScript see note #2).

The problem happens, if the input image has another file type, than the type, which TYPO3 uses internally.

The result are broken output images.

Example:

Source im My Extension to create small Image

$imgConfig = array();
$imgConfig[‘file’] = ‘GIFBUILDER’;
$imgConfig[‘file.’][‘XY’] =$w.’,’.$h;
$imgConfig[‘file.’][‘backColor’] =’#ff0000’;
$imgConfig[‘file.’][‘transparentColor’] =’#000000’;
$imgConfig[‘file.’][‘10’] =‘IMAGE’;
$imgConfig[‘file.’][‘10.’][‘file’]= ‘fileadmin/somefile.jpg’
$imgConfig[‘file.’][‘10.’][‘file.’][‘maxW’]=$w;
$imgConfig[‘file.’][‘10.’][‘file.’][‘maxH’]=$h;
$bildstring = $this->cObj->IMAGE;

Result:
I get a red(!) Picture.

The image somefile.jpg is rendered in one step into the folder typo3temp/_processed_/csm_somefile_hash.jpg
This file is internal a gif or png (as it is set in the config of typo3)

Later in core/Classes/Imaging/GraphicalFunction.php the imageCreateFromFile function tries to work with the file and uses the fileextension
In my case Extension = jpg and mimetype = png

The function called imagecreatefromjpeg and gets an empty result

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.