Project

General

Profile

Actions

Bug #43624

closed

Gifbuilder cannot generate images

Added by torsten wolter over 11 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Image Cropping
Target version:
Start date:
2012-12-05
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
5.3
Tags:
Complexity:
medium
Is Regression:
Sprint Focus:

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


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #46866: wrong image extensionsClosed2013-04-02

Actions
Related to TYPO3 Core - Bug #46530: Crop-Scaled images have wrong file content typeClosed2013-03-292013-03-29

Actions
Actions

Also available in: Atom PDF