Bug #18435
closedCropscaling with GIFBUILDER creates PNG/GIF-File with Extension .jpg (Wrong MIME-Type)
0%
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)
No data to display