[TYPO3-english] Forcing .png files with $this->cObj->IMG_RESOURCE

bernd wilke x00nsji02 at sneakemail.com
Thu Sep 24 13:40:57 CEST 2009


Am Thu, 24 Sep 2009 11:56:18 +0200 schrieb Bert Hiddink:

> Hello!
> 
> I have the following:
> 
> ...
> $iconConf = array(
>     'file' => $imgpath.$image,
>     'file.' => array(
>       'width' => '36',
>       'format' => 'png',
>     ),
> );
> 
> $img= $this->cObj->IMG_RESOURCE($iconConf); ...
> 
> However, this still gives me a resized .jpg instead of a .png.
> 
> I know I can do that with the GIFBUILDER-object but could I not just add
> this param to the array $iconConf???
> 

what should be png? the included file or the result?

I think you set the format at the wrong level
try it like this:

$iconConf = array(
    'file' => $imgpath.$image,
    'file.' => array(
      'width' => '36',
    ),
    'format' => 'png',
);

bernd
-- 
http://www.pi-phi.de/rendering.html


More information about the TYPO3-english mailing list