---
title: "Note on (+calc)"
manual: "TypoScript Explained"
version: "13.4"
permalink: "https://docs.typo3.org/permalink/t3tsref:gifbuilder-calc@13.4"
source: "Gifbuilder/Calc.rst"
rendered: "2026-09-19T07:15:48+00:00"
---

# Note on (+calc) {#gifbuilder-calc}

Whenever the [+calc](https://docs.typo3.org/permalink/t3tsref:calc@13.4) function is added to a value in the data type
of the properties underneath, you can use the dimensions of
[TEXT](https://docs.typo3.org/permalink/t3tsref:gifbuilder-text@13.4) and [IMAGE](https://docs.typo3.org/permalink/t3tsref:gifbuilder-image@13.4) objects from
the `GIFBUILDER` object array. This is done by inserting a tag like
this: `[10.w]` or `[10.h]`, where `10` is the
`GIFBUILDER` object number in the array and `w`/`h` signifies either
width or height of the object.

The special property `lineHeight` (for example,
`[10.lineHeight]`) uses the height a single line of text would take.

On using the special function `max()`, the maximum of multiple
values can be determined. Example:

**EXT:site_package/Configuration/TypoScript/setup.typoscript**

```typoscript
XY = [10.w]+[20.w], max([10.h], [20.h])
```

Here is a full example:

**EXT:site_package/Configuration/TypoScript/setup.typoscript**

```typoscript
lib.example = IMAGE
lib.example {
  file = GIFBUILDER
  file {
    XY = [10.w]+20, [10.h]+20
    backColor = #ff8700
    format = png

    10 = TEXT
    10 {
      text = TYPO3 GIFBUILDER Example
      fontSize = 20
      fontColor = #ffffff
      offset = 10,25
    }
  }
}

```

As you see, the image has a width/height defined as the width/height of the text
printed onto it + 20 pixels.

The generated image looks like:

![TYPO3 GIFBUILDER Example](../Images/ManualScreenshots/FrontendOutput/Gifbuilder/typo3-gifbuilder-example.png)
