Bug #41425
closedImage effects "sharpen" slow
0%
Description
For images (tt_content) elements there's a dropdown with some image effects than can be applied to images rendered with IMG_TEXT. The parameter for the "Sharpen" effect is set to "-sharpen 70". When setting the sharpen to such a high value it takes a long time for images to be converted using Graphicsmagick/Imagemagick.
According to the documentation of Graphicsmagick the first parameter to "-sharpen" should be the radius of the sharpen filter. It think a value of "70" is way to high, for some images it takes about 10 seconds to apply this filter.
Does anyone know what would be a good value? It could be fixed by modifying the "$image_effects" in "tslib_cObj".
Updated by Steffen Gebert about 12 years ago
- Status changed from New to Needs Feedback
Thanks for you report, Arjen.
Where did you find the statement that 10px is a good value? I wasn't able to find that in the IM and GM docs, see http://www.graphicsmagick.org/GraphicsMagick.html#details-sharpen
It sounds reasonable, if the IM/GM docs suggest lower values. Could you create 2-3 test images, which apply that filter and attach them here?
Thanks a lot!
Steffen
Updated by Arjen Hoekema about 12 years ago
Hi Steffen,
I didn't say that 10px is a good value :-) The ImageMagick documentation has some more explanation about the parameters used by blur/sharpen: http://www.imagemagick.org/Usage/blur/#sharpen
It states that the parameter to the sharpen operation should be {radius}x{sigma} and it would be best to set the radius to "0":
"First forget the first number, just use 0 which will then use the best number for the 'sigma' factor you give. The larger the sigma the more it sharpens."
I'll try to generate some test images this week trying out some different values for "sigma" and measure the speed of the operation.
Updated by Tomasz Krawczyk about 12 years ago
I think the IM syntax had been changed but the value '-sharpen 70' in the tslib_cObj->image_effects(11) was forgotten. It could happen between IM 4 and 5.
The value t3lib_stdGraphic->V5_EFFECTS is used to run V5 or older syntax (f.e in the t3lib_stdGraphic->makeShadow() method). Now IM 6 or newer are allowed.
So, I suggest to change tslib_cObj->image_effects(11) to '-sharpen 0x2'.
Updated by Alexander Opitz over 11 years ago
Hi,
as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (4.5 or 6.1)?
Updated by Arjen Hoekema over 11 years ago
This problem still exists in the newer versions, in TYPO3 CMS 6.1 see 'TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer' public variable '$image_effects'. This is still set to '-sharpen 70'. Maybe the sharpen image effect could be removed or run through the 'v5_sharpen' helper method (TYPO3\CMS\Core\Imaging\GraphicalFunctions). Or the complete array of 'image_effects' options should be parsed using the 'IMparams' helper method (seems like 'contrast' and 'normalize' are not available here).
Updated by Alexander Opitz over 11 years ago
- Status changed from Needs Feedback to New
Updated by Mathias Schreiber almost 10 years ago
- Status changed from New to Rejected
- Priority changed from Should have to Won't have this time
- Is Regression set to No
Background:
We will remove most of these settings in future versions.