Project

General

Profile

Actions

Bug #18435

closed

Cropscaling with GIFBUILDER creates PNG/GIF-File with Extension .jpg (Wrong MIME-Type)

Added by Andreas Dörler about 16 years ago. Updated about 16 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Communication
Target version:
-
Start date:
2008-03-13
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Howto reproduce:
page.9 = IMAGE
page.9 {
file = GIFBUILDER
file {
XY = 398,175
format = jpg
10 = IMAGE
10 {
file = fileadmin/test.jpg
offset = 0,0
width = 398c
height = 175c
}
}
}

results in:
web:/var/www/typo3temp/pics# identify *
7c354fbfb8.jpg PNG 170x135 170x135+0+0 DirectClass 32kb
crs-7c354fbfb8.jpg2 JPEG 180x135 DirectClass 7kb

As you can see, the scaled image is still correct (jpg), but after GIFBUILDER the file is a PNG if using $TYPO3_CONF_VARS['GFX']['gdlib_png'] = '1'; or GIF with $TYPO3_CONF_VARS['GFX']['gdlib_png'] = '0';

GFX-Config from localconf.php:
$TYPO3_CONF_VARS['GFX']["im"] = '1';
$TYPO3_CONF_VARS['GFX']['im_combine_filename'] = 'composite';
$TYPO3_CONF_VARS['GFX']["im_path"] = '/usr/bin/';
$TYPO3_CONF_VARS['GFX']["im_path_lzw"] = '/usr/bin/';
$TYPO3_CONF_VARS['GFX']['im_version_5'] = 'gm';
$TYPO3_CONF_VARS['GFX']['gdlib_2'] = '1';
$TYPO3_CONF_VARS['GFX']['jpg_quality'] = '85';
$TYPO3_CONF_VARS['GFX']['gdlib_png'] = '1';
$TYPO3_CONF_VARS['GFX']['png_truecolor'] = '1';
$TYPO3_CONF_VARS["GFX"]["gif_compress"] = '1';
$TYPO3_CONF_VARS['GFX']['im_imvMaskState'] = '1';
$TYPO3_CONF_VARS['GFX']['im_negate_mask'] = '1';
$TYPO3_CONF_VARS["GFX"]["TTFdpi"] = '96';

GM-Version:
graphicsmagick-imagemagick-compat version 1.1.7-13.

Workaround:
adding 'format'=>'jpg' in file class.t3lib_stdgraphic.php on line 2201
$tmpParm = Array('format'=>'jpg', 'XY' => intval($data['origW']).','.intval($data['origH']),
'10' => 'IMAGE',
'10.' => array('file'=> $crsOutput, 'offset'=> $ofX.','.$ofY),
);

This is just a workaround on my testsystem. I think it would be better to use the original file format created in the scaling process.
(issue imported from #M7844)


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #16545: GIFBUILDER indexcolors cropsized imagesClosedOliver Hader2006-09-09

Actions

No data to display

Actions

Also available in: Atom PDF