[TYPO3-core] RFC #8512: Feature: New Hook in function cImage of class.tslib_content.php

Stefan Geith typo3dev2008.nospam1 at geithware.de
Mon Aug 3 12:04:25 CEST 2009


Dmitry Dulepov [typo3] schrieb:
> Benjamin Mack wrote:
>> Hey Dmitry,
>>
>> Dmitry Dulepov [typo3] wrote:
>>> No, we can't get rid of hook once it is there.
>> Sorry, I meant: We don't need the hook at all.
> 
> Hook advantage is that several extensions can use it. And it will be 
> applied to any cImage in the system. It is not possible with stdWrap 
> unless you do a hook for the stdWrap, which is performance costly. Also 
> extensions cannot hook directly to cImage without a hook.
> 

Wouldn't it be better to add the hook at the end of function 
getImgResource() ?

Then even image_resources by IMG_RESOURCE() are included.
(See http://bugs.typo3.org/bug_relationship_graph.php?bug_id=9292)

What do you think ?


/Stefan

P.S.: Usecase: add rounded corners to any image rendered.
There is already an extension that does this (rounded_corners)
but it uses XCLASS for tslib_cObj.


More information about the TYPO3-team-core mailing list