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

Matias Coca matiascoca at gmail.com
Mon Apr 6 14:16:37 CEST 2009


Thanks, i can solve my problem.
My code work!!

$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'] = $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" />';



Matias Coca


On Sat, Apr 4, 2009 at 10:30 AM, bernd wilke <x00nsji02 at sneakemail.com>wrote:

> Am Fri, 03 Apr 2009 19:07:25 -0300 schrieb Matias Coca:
>
>
> > No, maybe i not expressed correctly.
> > I want put an image inside the gifbuilder object image.
> >
> > $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';
> >
> > but this doesn't work.
>
> which image?
>
> I miss something like:
> $imgTSConfigThumb['file.']['10.']['file']=$imagename;
>
> if you have name and path of your image in a variable you don't need
> import and can use '.10.file' directly.
>
> bernd
> --
> http://www.pi-phi.de/t3v4/cheatsheet.html
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>


More information about the TYPO3-english mailing list