[Typo3-dev] $this->cObj->IMAGE without any html in it?
Dominic Stockdale
dom at 3ev.com
Mon Sep 29 15:35:32 CEST 2003
Luite van Zelst wrote:
>> Thanks Jan. I've got it working with some very messy expressions, I
>> can't help thinking that there must be a cleaner way. I looked at
>> using IMG_RESOURCE in the typoscript but it doesn't seem to offer any
>> sizing.
>>
>> Anyway as it all works now I'll come back and clean it up later.
>
>
> it all depends on what you want to do! here is a direct approach:
>
> require_once (PATH_t3lib . 'class.t3lib_stdgraphic.php');
> //require_once (PATH_site . 'tslib/class.tslib_gifbuilder.php');
>
> //instantiate either one, depending on if you want a gifbuilder.
> $imageObj = t3lib_div::makeInstance('t3lib_stdgraphic');
>
> // call init
> $imageObj->init();
>
> // set temp path
> $stdgraphic->tempPath = PATH_site . $stdgraphic->tempPath;
>
> // example: scale down an image:
> $icon = $stdgraphic->imageMagickConvert($imgpath,NULL,NULL,
> NULL,NULL,NULL,array('maxH'=> '18', 'maxW' => '18'));
>
> so for this direct approach you'll have to browse through
> t3lib_stdgraphic or tslib_gifbuilder to see what function fit your need.
>
> regards, Luite
>
>
Thanks for the reply Luite. Although this extension is done and dusted
I'll take a look through these classes.
Cheers,
Dom
More information about the TYPO3-dev
mailing list