[TYPO3] Scale gifbuilde image

JoH asenau info at cybercraft.de
Sun Dec 10 18:32:59 CET 2006


Tapio Markula wrote:
> In the page
>
http://typo3.org/documentation/document-library/references/doc_core_tsref/current/view/9/2/
>
> SCALE:
> NOTE:  This object resets workArea to the new dimensiosn of the image!
>
> Property:
>
> Data type:
>
>
> Description:
>
> Default:
> width
>
> pixels + calc
>
> height
>
> pixels + calc ?????????????
>
> params
>
> ImageMagickParams
>
> [tsref:->GIFBUILDER.(GBObj).SCALE]
>
> That is extremely minimal info - I don't figure at all what to do.
> Could someone give some glue?

http://typo3.org/documentation/document-library/references/doc_core_tsref/current/view/9/1/#id2819294

http://typo3.org/documentation/document-library/core-documentation/doc_core_tsbyex/current/view/6/3/#id2853351

> that doesn't work and because of missing proper documentation I'm lost
> without any example

You see it's not missing ...

Simply do something like this:

blah = IMAGE
blah {
    file = GIFBUILDER
    file {
        # here's some "calc" alreay
        XY = [10.w],[10.h]
        10 = IMAGE
        10.file = whatever/your/image/path/is.jpg
        20 = SCALE
        20 {
            # even more "calc"
            width = [10.w]/2
            height = [10.h]/2
        }
    }
}

This will scale the original image to 50%.
So if you add something after part 20, there will be only 50% of the
original working area remaining.

blah = IMAGE
blah {
    file = GIFBUILDER
    file {
        # here's some "calc" already
        XY = [10.w],[10.h]
        10 = IMAGE
        10.file = whatever/your/image/path/is.jpg
        20 = SCALE
        20 {
            # even more "calc"
            width = [10.w]/2
            height = [10.h]/2
        }
        30 = TEXT
        30.text = Blah
        # and again "calc"
        30.offset = 10,[20.h]-10
    }
}

HTH

Joey


-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC/Xing: http://www.cybercraft.de
T3 cookbook: http://www.typo3experts.com




More information about the TYPO3-english mailing list