[TYPO3-english] Create GIFBULDER image object using the API

Michael Miousse mmiousse at infoglobe.ca
Fri Apr 3 22:08:06 CEST 2009


Le Fri, 03 Apr 2009 15:43:44 -0300, Matias Coca a écrit :

>   $path = $myImagePath;
>   $cObj = t3lib_div::makeInstance('tslib_cObj');
> 
>   $imgTSConfigThumb['file'] = 'GIFBUILDER';
>   $imgTSConfigThumb['file.']['XY'] = 150,100
>   $imgTSConfigThumb['file.']['format'] = 'jpg';
>   $imgTSConfigThumb['file.']['quality'] = 85;
>   $imgTSConfigThumb['file.']['backColor'] = 'white';
>   $imgTSConfigThumb['file.']['10'] = 'IMAGE';
>   $imgTSConfigThumb['file.']['10.']['file.']['import'] = $path;
>   $imgTSConfigThumb['file.']['10.']['file.']['maxW'] = 150;
>   $imgTSConfigThumb['file.']['10.']['file.']['maxH'] = 100;
>   $imgTSConfigThumb['file.']['10.']['align'] = 'c,c';
> 
>   $thumbpath = $this->cObj->IMG_RESOURCE($imgTSConfigThumb); $link =
>   '<img src="'.$thumbpath.'" class="thumbnail" />';

do you mean something like this:

  $path = $myImagePath;
  $cObj = t3lib_div::makeInstance('tslib_cObj');

  $imgTSConfigThumb['file'] = 'GIFBUILDER';
  $imgTSConfigThumb['file.']['XY'] = 150,100
  $imgTSConfigThumb['file.']['format'] = 'jpg';
  $imgTSConfigThumb['file.']['quality'] = 85;
  $imgTSConfigThumb['file.']['backColor'] = 'white';
  $imgTSConfigThumb['file.']['10'] = 'IMAGE';
  $imgTSConfigThumb['file.']['10.']['file.']['import'] = $path;
  $imgTSConfigThumb['file.']['10.']['file.']['maxW'] = 150;
  $imgTSConfigThumb['file.']['10.']['file.']['maxH'] = 100;
  $imgTSConfigThumb['file.']['10.']['align'] = 'c,c';
  $imgTSConfigThumb['file'][20] = 'IMAGE';
 $imgTSConfigThumb['file'][20]['file'] = 'GIFBUILDER';
  $imgTSConfigThumb['file.'][20.]['file.']['XY'] = 150,100
  $imgTSConfigThumb['file.'][20.]['file.']['format'] = 'jpg';
  $imgTSConfigThumb['file.'][20.]['file.']['quality'] = 85;
  $imgTSConfigThumb['file.'][20.]['file.']['backColor'] = 'white';

  $thumbpath = $this->cObj->IMG_RESOURCE($imgTSConfigThumb);
  $link = '<img src="'.$thumbpath.'" class="thumbnail" />';


More information about the TYPO3-english mailing list