‪TYPO3CMS  11.5
TYPO3\CMS\Core\Imaging\GraphicalFunctions Class Reference
Inheritance diagram for TYPO3\CMS\Core\Imaging\GraphicalFunctions:
TYPO3\CMS\Frontend\Imaging\GifBuilder

Public Member Functions

 __construct ()
 
 maskImageOntoImage (&$im, $conf, $workArea)
 
 copyImageOntoImage (&$im, $conf, $workArea)
 
 copyGifOntoGif (&$im, $cpImg, $conf, $workArea)
 
 imagecopyresized (&$dstImg, $srcImg, $dstX, $dstY, $srcX, $srcY, $dstWidth, $dstHeight, $srcWidth, $srcHeight)
 
 makeText (&$im, $conf, $workArea)
 
array txtPosition ($conf, $workArea, $BB)
 
array calcBBox ($conf)
 
 addToMap ($cords, $conf)
 
array calcTextCordsForMap ($cords, $offset, $conf)
 
 SpacedImageTTFText (&$im, $fontSize, $angle, $x, $y, $Fcolor, $fontFile, $text, $spacing, $wordSpacing, $splitRenderingConf, $sF=1)
 
int fontResize ($conf)
 
array ImageTTFBBoxWrapper ($fontSize, $angle, $fontFile, $string, $splitRendering, $sF=1)
 
 ImageTTFTextWrapper ($im, $fontSize, $angle, $x, $y, $color, $fontFile, $string, $splitRendering, $sF=1)
 
array splitString ($string, $splitRendering, $fontSize, $fontFile)
 
array calcWordSpacing ($conf, $scaleFactor=1)
 
int getTextScalFactor ($conf)
 
 setImageFileExt (array $imageFileExt)
 
 makeOutline (&$im, $conf, $workArea, $txtConf)
 
array circleOffset ($distance, $iterations)
 
 makeEmboss (&$im, $conf, $workArea, $txtConf)
 
 makeShadow (&$im, $conf, $workArea, $txtConf)
 
 makeBox (&$im, $conf, $workArea)
 
 makeEllipse (&$im, array $conf, array $workArea)
 
 makeEffect (&$im, $conf)
 
string IMparams ($setup)
 
 adjust (&$im, $conf)
 
 crop (&$im, $conf)
 
 scale (&$im, $conf)
 
 setWorkArea ($workArea)
 
 autolevels (&$im)
 
 outputLevels (&$im, $low, $high, $swap=false)
 
 inputLevels (&$im, $low, $high)
 
string IMreduceColors ($file, $cols)
 
string v5_sharpen ($factor)
 
string v5_blur ($factor)
 
string randomName ()
 
array applyOffset ($cords, $OFFSET)
 
array convertColor ($string)
 
array objPosition ($conf, $workArea, $BB)
 
array null imageMagickConvert ($imagefile, $newExt='', $w='', $h='', $params='', $frame='', $options=[], $mustCreate=false)
 
array null getImageDimensions ($imageFile)
 
bool cacheImageDimensions (array $identifyResult)
 
array bool getCachedImageDimensions ($filePath)
 
array getImageScale ($info, $w, $h, $options)
 
array null imageMagickIdentify ($imagefile)
 
string imageMagickExec ($input, $output, $params, $frame=0)
 
string combineExec ($input, $overlay, $mask, $output)
 
 applyImageMagickToPHPGif (&$im, $command)
 
string gif_or_jpg ($type, $w, $h)
 
string output ($file)
 
 destroy ()
 
string imgTag ($imgInfo)
 
bool ImageWrite ($destImg, $theImage, $quality=0)
 
resource imageCreateFromFile ($sourceImg)
 
string hexColor ($color)
 
int unifyColors (&$img, $colArr, $closest=false)
 
 getTemporaryImageWithText ($filename, $textline1, $textline2, $textline3)
 

Static Public Member Functions

static string gifCompress ($theFile, $type)
 
static string null readPngGif ($theFile, $output_png=false)
 

Public Attributes

bool $addFrameSelection = true
 
string $gifExtension = 'gif'
 
int $truecolorColors = 16777215
 
array $cmds
 
string $filenamePrefix = ''
 
string $imageMagickConvert_forceFileNameBody = ''
 
bool $dontCheckForExistingTempFile = false
 
bool $dontCompress = false
 
string $alternativeOutputKey = ''
 
array $IM_commands = array( )
 
array $workArea = array( )
 
string $scalecmd = '-auto-orient -geometry'
 
string $map = ''
 
array $setup = array( )
 
int $w = 0
 
int $h = 0
 

Protected Member Functions

 renderTTFText (&$im, $fontSize, $angle, $x, $y, $color, $fontFile, $string, $splitRendering, $conf, $sF=1)
 
array getWordPairsForLineBreak ($string)
 
int getRenderedTextWidth ($text, $conf)
 
int getBreakSpace ($conf, ?array $boundingBox=null)
 
string generateCacheKeyForImageFile ($filePath)
 
string generateStatusHashForImageFile ($filePath)
 
string null executeIdentifyCommandForImageFile (string $imageFile)
 
float compensateFontSizeiBasedOnFreetypeDpi ($fontSize)
 

Protected Attributes

array $gdlibExtensions = array( )
 
string $colorspace = 'RGB'
 
array $allowedColorSpaceNames
 
array $imageFileExt = array( 'gif', 'jpg', 'jpeg', 'png', 'tif', 'bmp', 'tga', 'pcx', 'ai', 'pdf', 'webp' )
 
array $webImageExt = array( 'gif', 'jpg', 'jpeg', 'png' )
 
bool $processorEffectsEnabled = false
 
bool $processorEnabled
 
bool $mayScaleUp = true
 
bool $saveAlphaLayer = false
 
string $im5fx_blurSteps = '1x2,2x2,3x2,4x3,5x3,5x4,6x4,7x5,8x5,9x5'
 
string $im5fx_sharpenSteps = '1x2,2x2,3x2,2x3,3x3,4x3,3x4,4x4,4x5,5x5'
 
int $pixelLimitGif = 10000
 
array $colMap
 
CharsetConverter $csConvObj
 
int $jpegQuality = 85
 
array $OFFSET
 
resource GdImage $im
 

Detailed Description

Standard graphical functions

Class contains a bunch of cool functions for manipulating graphics with GDlib/Freetype and ImageMagick. VERY OFTEN used with gifbuilder that extends this class and provides a TypoScript API to using these functions

Definition at line 36 of file GraphicalFunctions.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Imaging\GraphicalFunctions::__construct ( )

Reads configuration information from $GLOBALS['TYPO3_CONF_VARS']['GFX'] and sets some values in internal variables.

Definition at line 274 of file GraphicalFunctions.php.

References $GLOBALS, TYPO3\CMS\Core\Imaging\GraphicalFunctions\$jpegQuality, TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange(), TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\v5_sharpen().

Member Function Documentation

◆ addToMap()

TYPO3\CMS\Core\Imaging\GraphicalFunctions::addToMap (   $cords,
  $conf 
)

Adds an <area> tag to the internal variable $this->map which is used to accumulate the content for an ImageMap

Parameters
array$cords‪Coordinates for a polygon image map as created by ->calcTextCordsForMap()
array$confConfiguration for "imgMap." property of a TEXT GIFBUILDER object.
See also
makeText()
calcTextCordsForMap()

Definition at line 781 of file GraphicalFunctions.php.

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeText().

◆ adjust()

TYPO3\CMS\Core\Imaging\GraphicalFunctions::adjust ( $im,
  $conf 
)

Implements the "ADJUST" GIFBUILDER object

Parameters
resource$im‪GDlib image pointer
array$confTypoScript array with configuration for the GIFBUILDER object.
See also
‪\TYPO3\CMS\Frontend\Imaging\GifBuilder::make()
‪autoLevels()
outputLevels()
inputLevels()

Definition at line 1629 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\$setup, TYPO3\CMS\Core\Imaging\GraphicalFunctions\autolevels(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\inputLevels(), TYPO3\CMS\Core\Utility\GeneralUtility\intExplode(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\outputLevels().

Referenced by TYPO3\CMS\Frontend\Imaging\GifBuilder\make().

◆ applyImageMagickToPHPGif()

TYPO3\CMS\Core\Imaging\GraphicalFunctions::applyImageMagickToPHPGif ( $im,
  $command 
)

Applies an ImageMagick parameter to a GDlib image pointer resource by writing the resource to file, performing an IM operation upon it and reading back the result into the ImagePointer.

Parameters
resource$im‪The image pointer (reference)
string$command‪The ImageMagick parameters. Like effects, scaling etc.

Definition at line 2615 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\$gifExtension, TYPO3\CMS\Core\Imaging\GraphicalFunctions\$im, TYPO3\CMS\Core\Imaging\GraphicalFunctions\imageCreateFromFile(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\imageMagickExec(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\ImageWrite(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\randomName().

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeEffect().

◆ applyOffset()

array TYPO3\CMS\Core\Imaging\GraphicalFunctions::applyOffset (   $cords,
  $OFFSET 
)

Applies offset value to coordinated in $cords. Basically the value of key 0/1 of $OFFSET is added to keys 0/1 of $cords

Parameters
array$cords‪Integer coordinates in key 0/1
array$OFFSET‪Offset values in key 0/1
Returns
‪array Modified $cords array

Definition at line 1925 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\$OFFSET.

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeOutline(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeShadow(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\objPosition(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\setWorkArea(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\txtPosition().

◆ autolevels()

TYPO3\CMS\Core\Imaging\GraphicalFunctions::autolevels ( $im)

Apply auto-levels to input image pointer

Parameters
resource$im‪GDlib Image Pointer

Definition at line 1755 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\$im.

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\adjust().

◆ cacheImageDimensions()

bool TYPO3\CMS\Core\Imaging\GraphicalFunctions::cacheImageDimensions ( array  $identifyResult)

Caches the result of the getImageDimensions function into the database. Does not check if the file exists.

Parameters
array$identifyResult‪Result of the getImageDimensions function
Returns
‪bool always TRUE

Definition at line 2195 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\generateCacheKeyForImageFile(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\generateStatusHashForImageFile().

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\getImageDimensions().

◆ calcBBox()

array TYPO3\CMS\Core\Imaging\GraphicalFunctions::calcBBox (   $conf)

◆ calcTextCordsForMap()

array TYPO3\CMS\Core\Imaging\GraphicalFunctions::calcTextCordsForMap (   $cords,
  $offset,
  $conf 
)

Calculating the coordinates for a TEXT string on an image map. Used in an <area> tag

Parameters
array$cords‪Coordinates (from BBOX array)
array$offset‪Offset array
array$confConfiguration for "imgMap." property of a TEXT GIFBUILDER object.
Returns
‪array
See also
makeText()
calcTextCordsForMap()

Definition at line 801 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\intExplode().

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeText().

◆ calcWordSpacing()

array TYPO3\CMS\Core\Imaging\GraphicalFunctions::calcWordSpacing (   $conf,
  $scaleFactor = 1 
)

Calculates the spacing and wordSpacing values

Parameters
array$confTypoScript array for the TEXT GIFBUILDER object
int$scaleFactorTypoScript value from eg $conf['niceText.']['scaleFactor']
Returns
‪array Array with two keys [0]/[1] being array($spacing,$wordSpacing)
See also
calcBBox()

Definition at line 1133 of file GraphicalFunctions.php.

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\calcBBox(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\fontResize(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeText().

◆ circleOffset()

array TYPO3\CMS\Core\Imaging\GraphicalFunctions::circleOffset (   $distance,
  $iterations 
)

Creates some offset values in an array used to simulate a circularly applied outline around TEXT

access private

Parameters
int$distance‪Distance
int$iterations‪Iterations.
Returns
‪array
See also
makeOutline()

Definition at line 1322 of file GraphicalFunctions.php.

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeOutline().

◆ combineExec()

string TYPO3\CMS\Core\Imaging\GraphicalFunctions::combineExec (   $input,
  $overlay,
  $mask,
  $output 
)

Executes an ImageMagick "combine" (or composite in newer times) on four filenames - $input, $overlay and $mask as input files and $output as the output filename (written to) Can be used for many things, mostly scaling and effects.

Parameters
string$input‪The relative to public web path image filepath, bottom file
string$overlay‪The relative to public web path image filepath, overlay file (top)
string$mask‪The relative to public web path image filepath, the mask file (grayscale)
string$output‪The relative to public web path image filepath, output filename (written to)
Returns
‪string

Definition at line 2482 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\$gifExtension, $output, TYPO3\CMS\Core\Utility\CommandUtility\escapeShellArgument(), TYPO3\CMS\Core\Utility\CommandUtility\exec(), TYPO3\CMS\Core\Utility\GeneralUtility\fixPermissions(), TYPO3\CMS\Core\Imaging\ImageMagickFile\fromFilePath(), TYPO3\CMS\Core\Utility\CommandUtility\imageMagickCommand(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\imageMagickExec(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\randomName().

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeShadow(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeText(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\maskImageOntoImage().

◆ compensateFontSizeiBasedOnFreetypeDpi()

float TYPO3\CMS\Core\Imaging\GraphicalFunctions::compensateFontSizeiBasedOnFreetypeDpi (   $fontSize)
protected

Function to compensate for DPI resolution. FreeType 2 always has 96 dpi, so it is hard-coded at this place.

Parameters
float$fontSize‪font size for freetype function call
Returns
‪float compensated font size based on 96 dpi

Definition at line 2932 of file GraphicalFunctions.php.

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\ImageTTFBBoxWrapper(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\ImageTTFTextWrapper().

◆ convertColor()

array TYPO3\CMS\Core\Imaging\GraphicalFunctions::convertColor (   $string)

Converts a "HTML-color" TypoScript datatype to RGB-values. Default is 0,0,0

Parameters
string$string‪"HTML-color" data type string, eg. 'red', '#ffeedd' or '255,0,255'. You can also add a modifying operator afterwards. There are two options: "255,0,255 : 20" - will add 20 to values, result is "255,20,255". Or "255,0,255 : *1.23" which will multiply all RGB values with 1.23
Returns
‪array RGB values in key 0/1/2 of the array

Definition at line 1939 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange().

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\crop(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\ImageTTFTextWrapper(), TYPO3\CMS\Frontend\Imaging\GifBuilder\make(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeBox(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeEllipse(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeShadow(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeText(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\unifyColors().

◆ copyGifOntoGif()

TYPO3\CMS\Core\Imaging\GraphicalFunctions::copyGifOntoGif ( $im,
  $cpImg,
  $conf,
  $workArea 
)

Copies two GDlib image pointers onto each other, using TypoScript configuration from $conf and the input $workArea definition.

Parameters
resource$im‪GDlib image pointer, destination (bottom image)
resource$cpImg‪GDlib image pointer, source (top image)
array$confTypoScript array with the properties for the IMAGE GIFBUILDER object. Only used for the "tile" property value.
array$workArea‪Work area

Definition at line 439 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\$h, TYPO3\CMS\Core\Imaging\GraphicalFunctions\$w, TYPO3\CMS\Core\Imaging\GraphicalFunctions\$workArea, TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\imagecopyresized(), TYPO3\CMS\Core\Utility\GeneralUtility\intExplode(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\objPosition().

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\copyImageOntoImage(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\crop(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\maskImageOntoImage().

◆ copyImageOntoImage()

TYPO3\CMS\Core\Imaging\GraphicalFunctions::copyImageOntoImage ( $im,
  $conf,
  $workArea 
)

Implements the "IMAGE" GIFBUILDER object, when the "mask" property is FALSE (using only $conf['file'])

Parameters
resource$im‪GDlib image pointer
array$confTypoScript array with configuration for the GIFBUILDER object.
array$workArea‪The current working area coordinates.
See also
‪\TYPO3\CMS\Frontend\Imaging\GifBuilder::make()
maskImageOntoImage()

Definition at line 417 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\$workArea, TYPO3\CMS\Core\Imaging\GraphicalFunctions\copyGifOntoGif(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\imageCreateFromFile(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\imageMagickConvert().

Referenced by TYPO3\CMS\Frontend\Imaging\GifBuilder\make().

◆ crop()

TYPO3\CMS\Core\Imaging\GraphicalFunctions::crop ( $im,
  $conf 
)

◆ destroy()

TYPO3\CMS\Core\Imaging\GraphicalFunctions::destroy ( )

Destroy internal image pointer, $this->im

See also
‪\TYPO3\CMS\Frontend\Imaging\GifBuilder::gifBuild()

Definition at line 2699 of file GraphicalFunctions.php.

Referenced by TYPO3\CMS\Frontend\Imaging\GifBuilder\gifBuild().

◆ executeIdentifyCommandForImageFile()

string null TYPO3\CMS\Core\Imaging\GraphicalFunctions::executeIdentifyCommandForImageFile ( string  $imageFile)
protected

Internal function to execute an IM command fetching information on an image

Parameters
string$imageFile‪the absolute path to the image
Returns
‪string|null the raw result of the identify command.

Definition at line 2427 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Utility\CommandUtility\exec(), TYPO3\CMS\Core\Imaging\ImageMagickFile\fromFilePath(), and TYPO3\CMS\Core\Utility\CommandUtility\imageMagickCommand().

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\imageMagickIdentify().

◆ fontResize()

int TYPO3\CMS\Core\Imaging\GraphicalFunctions::fontResize (   $conf)

Function that finds the right fontsize that will render the textstring within a certain width

Parameters
array$conf‪The TypoScript properties of the TEXT GIFBUILDER object
Returns
‪int The new fontSize
See also
‪\TYPO3\CMS\Frontend\Imaging\GifBuilder::start()

Definition at line 868 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\calcWordSpacing(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\ImageTTFBBoxWrapper().

Referenced by TYPO3\CMS\Frontend\Imaging\GifBuilder\start().

◆ generateCacheKeyForImageFile()

string TYPO3\CMS\Core\Imaging\GraphicalFunctions::generateCacheKeyForImageFile (   $filePath)
protected

Creates the key for the image dimensions cache for an image file.

This method does not check if the image file actually exists.

Parameters
string$filePath‪Image file path, relative to public web path
Returns
‪string the hash key (an SHA1 hash), will not be empty

Definition at line 2256 of file GraphicalFunctions.php.

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\cacheImageDimensions(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\getCachedImageDimensions().

◆ generateStatusHashForImageFile()

string TYPO3\CMS\Core\Imaging\GraphicalFunctions::generateStatusHashForImageFile (   $filePath)
protected

Creates the status hash to check whether a file has been changed.

Parameters
string$filePath‪Image file path, relative to public web path
Returns
‪string the status hash (an SHA1 hash)

Definition at line 2268 of file GraphicalFunctions.php.

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\cacheImageDimensions(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\getCachedImageDimensions().

◆ getBreakSpace()

int TYPO3\CMS\Core\Imaging\GraphicalFunctions::getBreakSpace (   $conf,
?array  $boundingBox = null 
)
protected

Gets the break space for each new line.

Parameters
array$confTypoScript configuration for the currently rendered object
array | null$boundingBox‪The bounding box the the currently rendered object
Returns
‪int The break space

Definition at line 1263 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\calcBBox().

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\calcBBox(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\renderTTFText().

◆ getCachedImageDimensions()

array bool TYPO3\CMS\Core\Imaging\GraphicalFunctions::getCachedImageDimensions (   $filePath)

Fetches the cached image dimensions from the cache. Does not check if the image file exists.

Parameters
string$filePath‪Image file path, relative to public web path
Returns
‪array|bool an array where [0]/[1] is w/h, [2] is extension and [3] is the file name, or FALSE for a cache miss

Definition at line 2220 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\generateCacheKeyForImageFile(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\generateStatusHashForImageFile().

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\getImageDimensions().

◆ getImageDimensions()

array null TYPO3\CMS\Core\Imaging\GraphicalFunctions::getImageDimensions (   $imageFile)

Gets the input image dimensions.

Parameters
string$imageFile‪The image filepath
Returns
‪array|null Returns an array where [0]/[1] is w/h, [2] is extension and [3] is the filename.
See also
imageMagickConvert()
‪\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getImgResource()

Definition at line 2163 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\cacheImageDimensions(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\getCachedImageDimensions().

Referenced by TYPO3\CMS\Core\Resource\Processing\LocalImageProcessor\checkForExistingTargetFile(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\imageMagickConvert(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\maskImageOntoImage(), and TYPO3\CMS\Core\Resource\Processing\LocalImageProcessor\processTaskWithLocalFile().

◆ getImageScale()

array TYPO3\CMS\Core\Imaging\GraphicalFunctions::getImageScale (   $info,
  $w,
  $h,
  $options 
)

Get numbers for scaling the image based on input

Parameters
array$info‪Current image information: Width, Height etc.
string$w‪"required" width
string$h‪"required" height
array$options‪Options: Keys are like "maxW", "maxH", "minW", "minH
Returns
‪array
See also
imageMagickConvert()

Definition at line 2286 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\$h, and TYPO3\CMS\Core\Imaging\GraphicalFunctions\$w.

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\imageMagickConvert().

◆ getRenderedTextWidth()

int TYPO3\CMS\Core\Imaging\GraphicalFunctions::getRenderedTextWidth (   $text,
  $conf 
)
protected

Gets the rendered text width

Parameters
string$text
array$conf
Returns
‪int

Definition at line 1243 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\ImageTTFBBoxWrapper().

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\calcBBox(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\renderTTFText().

◆ getTemporaryImageWithText()

TYPO3\CMS\Core\Imaging\GraphicalFunctions::getTemporaryImageWithText (   $filename,
  $textline1,
  $textline2,
  $textline3 
)

Creates error image based on gfx/notfound_thumb.png Requires GD lib enabled, otherwise it will exit with the three textstrings outputted as text. Outputs the image stream to browser and exits!

Parameters
string$filename‪Name of the file
string$textline1‪Text line 1
string$textline2‪Text line 2
string$textline3‪Text line 3
Exceptions

Definition at line 2887 of file GraphicalFunctions.php.

References $GLOBALS, TYPO3\CMS\Core\Imaging\GraphicalFunctions\$im, and TYPO3\CMS\Core\Utility\ExtensionManagementUtility\extPath().

◆ getTextScalFactor()

int TYPO3\CMS\Core\Imaging\GraphicalFunctions::getTextScalFactor (   $conf)

Calculates and returns the niceText.scaleFactor

Parameters
array$confTypoScript array for the TEXT GIFBUILDER object
Returns
‪int TypoScript value from eg $conf['niceText.']['scaleFactor']

Definition at line 1150 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange().

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\calcBBox().

◆ getWordPairsForLineBreak()

array TYPO3\CMS\Core\Imaging\GraphicalFunctions::getWordPairsForLineBreak (   $string)
protected

Gets the word pairs used for automatic line breaks.

Parameters
string$string
Returns
‪array

Definition at line 1224 of file GraphicalFunctions.php.

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\calcBBox(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\renderTTFText().

◆ gif_or_jpg()

string TYPO3\CMS\Core\Imaging\GraphicalFunctions::gif_or_jpg (   $type,
  $w,
  $h 
)

Returns an image extension for an output image based on the number of pixels of the output and the file extension of the original file. For example: If the number of pixels exceeds $this->pixelLimitGif (normally 10000) then it will be a "jpg" string in return.

Parameters
string$type‪The file extension, lowercase.
int$w‪The width of the output image.
int$h‪The height of the output image.
Returns
‪string The filename, either "jpg" or "gif"/"png" (whatever $this->gifExtension is set to.)

Definition at line 2640 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\$gifExtension, and TYPO3\CMS\Core\Imaging\GraphicalFunctions\$w.

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\imageMagickConvert().

◆ gifCompress()

static string TYPO3\CMS\Core\Imaging\GraphicalFunctions::gifCompress (   $theFile,
  $type 
)
static

Compressing a GIF file if not already LZW compressed. This function is a workaround for the fact that ImageMagick and/or GD does not compress GIF-files to their minimum size (that is RLE or no compression used)

The function takes a file-reference, $theFile, and saves it again through GD or ImageMagick in order to compress the file GIF: If $type is not set, the compression is done with ImageMagick (provided that $GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_path_lzw'] is pointing to the path of a lzw-enabled version of 'convert') else with GD (should be RLE-enabled!) If $type is set to either 'IM' or 'GD' the compression is done with ImageMagick and GD respectively PNG: No changes.

$theFile is expected to be a valid GIF-file! The function returns a code for the operation.

Parameters
string$theFile‪Filepath
string$type‪See description of function
Returns
‪string Returns "GD" if GD was used, otherwise "IM" if ImageMagick was used. If nothing done at all, it returns empty string.

Definition at line 2527 of file GraphicalFunctions.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\PathUtility\dirname(), TYPO3\CMS\Core\Utility\CommandUtility\escapeShellArgument(), TYPO3\CMS\Core\Utility\CommandUtility\exec(), TYPO3\CMS\Core\Utility\GeneralUtility\fixPermissions(), TYPO3\CMS\Core\Imaging\ImageMagickFile\fromFilePath(), TYPO3\CMS\Core\Utility\StringUtility\getUniqueId(), and TYPO3\CMS\Core\Utility\CommandUtility\imageMagickCommand().

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\imageMagickConvert(), TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingWriteGifAction(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\output().

◆ hexColor()

string TYPO3\CMS\Core\Imaging\GraphicalFunctions::hexColor (   $color)

Returns the HEX color value for an RGB color array

Parameters
array$color‪RGB color array
Returns
‪string HEX color value

Definition at line 2806 of file GraphicalFunctions.php.

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\unifyColors().

◆ imagecopyresized()

TYPO3\CMS\Core\Imaging\GraphicalFunctions::imagecopyresized ( $dstImg,
  $srcImg,
  $dstX,
  $dstY,
  $srcX,
  $srcY,
  $dstWidth,
  $dstHeight,
  $srcWidth,
  $srcHeight 
)

Alternative function for using the similar PHP function imagecopyresized(). Used for GD2 only.

OK, the reason for this stupid fix is the following story: GD1.x was capable of copying two images together and combining their palettes! GD2 is apparently not. With GD2 only the palette of the dest-image is used which mostly results in totally black images when trying to copy a color-ful image onto the destination. The GD2-fix is to 1) Create a blank TRUE-COLOR image 2) Copy the destination image onto that one 3) Then do the actual operation; Copying the source (top image) onto that 4) ... and return the result pointer. 5) Reduce colors (if we do not, the result may become strange!) It works, but the resulting images is now a true-color PNG which may be very large. So, why not use 'imagetruecolortopalette ($im, TRUE, 256)' - well because it does NOT WORK! So simple is that.

Parameters
resource$dstImg‪Destination image
resource$srcImg‪Source image
int$dstX‪Destination x-coordinate
int$dstY‪Destination y-coordinate
int$srcX‪Source x-coordinate
int$srcY‪Source y-coordinate
int$dstWidth‪Destination width
int$dstHeight‪Destination height
int$srcWidth‪Source width
int$srcHeight‪Source height

Definition at line 518 of file GraphicalFunctions.php.

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\copyGifOntoGif(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeShadow().

◆ imageCreateFromFile()

resource TYPO3\CMS\Core\Imaging\GraphicalFunctions::imageCreateFromFile (   $sourceImg)

Creates a new GDlib image resource based on the input image filename. If it fails creating an image from the input file a blank gray image with the dimensions of the input image will be created instead.

Parameters
string$sourceImg‪Image filename
Returns
‪resource Image Resource pointer

Definition at line 2766 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\$im.

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\applyImageMagickToPHPGif(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\copyImageOntoImage(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeShadow(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeText(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\maskImageOntoImage(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\scale(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\unifyColors().

◆ imageMagickConvert()

array null TYPO3\CMS\Core\Imaging\GraphicalFunctions::imageMagickConvert (   $imagefile,
  $newExt = '',
  $w = '',
  $h = '',
  $params = '',
  $frame = '',
  $options = [],
  $mustCreate = false 
)

Converts $imagefile to another file in temp-dir of type $newExt (extension).

Parameters
string$imagefile‪The image filepath
string$newExt‪New extension, eg. "gif", "png", "jpg", "tif". If $newExt is NOT set, the new imagefile will be of the original format. If newExt = 'WEB' then one of the web-formats is applied.
string$w‪Width. $w / $h is optional. If only one is given the image is scaled proportionally. If an 'm' exists in the $w or $h and if both are present the $w and $h is regarded as the Maximum w/h and the proportions will be kept
string$h‪Height. See $w
string$params‪Additional ImageMagick parameters.
string$frame‪Refers to which frame-number to select in the image. '' or 0 will select the first frame, 1 will select the next and so on...
array$options‪An array with options passed to getImageScale (see this function).
bool$mustCreate‪If set, then another image than the input imagefile MUST be returned. Otherwise you can risk that the input image is good enough regarding measures etc and is of course not rendered to a new, temporary file in typo3temp/. But this option will force it to.
Returns
‪array|null [0]/[1] is w/h, [2] is file extension and [3] is the filename.
See also
getImageScale()
‪\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getImgResource()
maskImageOntoImage()
copyImageOntoImage()
scale()

Definition at line 2054 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\$h, TYPO3\CMS\Core\Imaging\GraphicalFunctions\$imageMagickConvert_forceFileNameBody, $output, TYPO3\CMS\Core\Imaging\GraphicalFunctions\$w, TYPO3\CMS\Core\Utility\PathUtility\basename(), TYPO3\CMS\Core\Utility\CommandUtility\escapeShellArgument(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\getImageDimensions(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\getImageScale(), TYPO3\CMS\Core\Core\Environment\getPublicPath(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\gif_or_jpg(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\gifCompress(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\imageMagickExec(), and TYPO3\CMS\Core\Utility\GeneralUtility\mkdir_deep().

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\copyImageOntoImage(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\maskImageOntoImage(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\scale().

◆ imageMagickExec()

string TYPO3\CMS\Core\Imaging\GraphicalFunctions::imageMagickExec (   $input,
  $output,
  $params,
  $frame = 0 
)

Executes an ImageMagick "convert" on two filenames, $input and $output using $params before them. Can be used for many things, mostly scaling and effects.

Parameters
string$input‪The relative to public web path image filepath, input file (read from)
string$output‪The relative to public web path image filepath, output filename (written to)
string$params‪ImageMagick parameters
int$frame‪Optional, refers to which frame-number to select in the image. '' or 0
Returns
‪string The result of a call to PHP function "exec()

Definition at line 2451 of file GraphicalFunctions.php.

References $output, TYPO3\CMS\Core\Utility\CommandUtility\escapeShellArgument(), TYPO3\CMS\Core\Utility\CommandUtility\exec(), TYPO3\CMS\Core\Utility\GeneralUtility\fixPermissions(), TYPO3\CMS\Core\Imaging\ImageMagickFile\fromFilePath(), and TYPO3\CMS\Core\Utility\CommandUtility\imageMagickCommand().

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\applyImageMagickToPHPGif(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\combineExec(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\imageMagickConvert(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\IMreduceColors(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeShadow(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeText(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\unifyColors().

◆ imageMagickIdentify()

array null TYPO3\CMS\Core\Imaging\GraphicalFunctions::imageMagickIdentify (   $imagefile)

Call the identify command

Parameters
string$imagefile‪The relative to public web path image filepath
Returns
‪array|null Returns an array where [0]/[1] is w/h, [2] is extension, [3] is the filename and [4] the real image type identified by ImageMagick.

Definition at line 2405 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\executeIdentifyCommandForImageFile().

◆ ImageTTFBBoxWrapper()

array TYPO3\CMS\Core\Imaging\GraphicalFunctions::ImageTTFBBoxWrapper (   $fontSize,
  $angle,
  $fontFile,
  $string,
  $splitRendering,
  $sF = 1 
)

Wrapper for ImageTTFBBox

Parameters
int$fontSize‪(See argument for PHP function ImageTTFBBox())
int$angle‪(See argument for PHP function ImageTTFBBox())
string$fontFile‪(See argument for PHP function ImageTTFBBox())
string$string‪(See argument for PHP function ImageTTFBBox())
array$splitRendering‪Split-rendering configuration
int$sF‪Scale factor
Returns
‪array Information array.

Definition at line 909 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\compensateFontSizeiBasedOnFreetypeDpi(), debug(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\splitString().

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\calcBBox(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\fontResize(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\getRenderedTextWidth(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\SpacedImageTTFText().

◆ ImageTTFTextWrapper()

TYPO3\CMS\Core\Imaging\GraphicalFunctions::ImageTTFTextWrapper (   $im,
  $fontSize,
  $angle,
  $x,
  $y,
  $color,
  $fontFile,
  $string,
  $splitRendering,
  $sF = 1 
)

Wrapper for ImageTTFText

Parameters
resource$im‪(See argument for PHP function imageTTFtext())
int$fontSize‪(See argument for PHP function imageTTFtext())
int$angle‪(See argument for PHP function imageTTFtext())
int$x‪(See argument for PHP function imageTTFtext())
int$y‪(See argument for PHP function imageTTFtext())
int$color‪(See argument for PHP function imageTTFtext())
string$fontFile‪(See argument for PHP function imageTTFtext())
string$string‪(See argument for PHP function imageTTFtext()). UTF-8 string, possibly with entities in.
array$splitRendering‪Split-rendering configuration
int$sF‪Scale factor

Definition at line 951 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\$im, TYPO3\CMS\Core\Imaging\GraphicalFunctions\compensateFontSizeiBasedOnFreetypeDpi(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\convertColor(), debug(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\splitString().

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\renderTTFText(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\SpacedImageTTFText().

◆ ImageWrite()

bool TYPO3\CMS\Core\Imaging\GraphicalFunctions::ImageWrite (   $destImg,
  $theImage,
  $quality = 0 
)

Writes the input GDlib image pointer to file

Parameters
resource$destImg‪The GDlib image resource pointer
string$theImage‪The filename to write to
int$quality‪The image quality (for JPEGs)
Returns
‪bool The output of either imageGif, imagePng or imageJpeg based on the filename to write
See also
maskImageOntoImage()
scale()
output()

Definition at line 2726 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\$jpegQuality, and TYPO3\CMS\Core\Utility\GeneralUtility\fixPermissions().

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\applyImageMagickToPHPGif(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeShadow(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeText(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\maskImageOntoImage(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\output(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\scale(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\unifyColors().

◆ imgTag()

string TYPO3\CMS\Core\Imaging\GraphicalFunctions::imgTag (   $imgInfo)

Returns Image Tag for input image information array.

Parameters
array$imgInfo‪Image information array, key 0/1 is width/height and key 3 is the src value
Returns
‪string Image tag for the input image information array.

Definition at line 2710 of file GraphicalFunctions.php.

◆ IMparams()

string TYPO3\CMS\Core\Imaging\GraphicalFunctions::IMparams (   $setup)

Creating ImageMagick parameters from TypoScript property

Parameters
string$setup‪A string with effect keywords=value pairs separated by "|
Returns
‪string ImageMagick prepared parameters.
See also
makeEffect()

Definition at line 1549 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\$setup, TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange(), TYPO3\CMS\Core\Utility\GeneralUtility\intExplode(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\v5_blur(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\v5_sharpen().

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeEffect().

◆ IMreduceColors()

string TYPO3\CMS\Core\Imaging\GraphicalFunctions::IMreduceColors (   $file,
  $cols 
)

Reduce colors in image using IM and create a palette based image if possible (<=256 colors)

Parameters
string$file‪Image file to reduce
int$cols‪Number of colors to reduce the image to.
Returns
‪string Reduced file

Definition at line 1838 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\imageMagickExec(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\randomName().

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\output().

◆ inputLevels()

TYPO3\CMS\Core\Imaging\GraphicalFunctions::inputLevels ( $im,
  $low,
  $high 
)

Apply input levels to input image pointer (increasing contrast)

Parameters
resource$im‪GDlib Image Pointer
int$low‪The "low" value (close to 0)
int$high‪The "high" value (close to 255)

Definition at line 1814 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\$im, and TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange().

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\adjust(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeShadow().

◆ makeBox()

TYPO3\CMS\Core\Imaging\GraphicalFunctions::makeBox ( $im,
  $conf,
  $workArea 
)

Implements the "BOX" GIFBUILDER object

Parameters
resource$im‪GDlib image pointer
array$confTypoScript array with configuration for the GIFBUILDER object.
array$workArea‪The current working area coordinates.
See also
‪\TYPO3\CMS\Frontend\Imaging\GifBuilder::make()

Definition at line 1473 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\$im, TYPO3\CMS\Core\Imaging\GraphicalFunctions\$workArea, TYPO3\CMS\Core\Imaging\GraphicalFunctions\convertColor(), TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange(), TYPO3\CMS\Core\Utility\GeneralUtility\intExplode(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\objPosition().

Referenced by TYPO3\CMS\Frontend\Imaging\GifBuilder\make().

◆ makeEffect()

TYPO3\CMS\Core\Imaging\GraphicalFunctions::makeEffect ( $im,
  $conf 
)

Implements the "EFFECT" GIFBUILDER object The operation involves ImageMagick for applying effects

Parameters
resource$im‪GDlib image pointer
array$confTypoScript array with configuration for the GIFBUILDER object.
See also
‪\TYPO3\CMS\Frontend\Imaging\GifBuilder::make()
applyImageMagickToPHPGif()

Definition at line 1533 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\applyImageMagickToPHPGif(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\IMparams().

Referenced by TYPO3\CMS\Frontend\Imaging\GifBuilder\make().

◆ makeEllipse()

TYPO3\CMS\Core\Imaging\GraphicalFunctions::makeEllipse ( $im,
array  $conf,
array  $workArea 
)

Implements the "Ellipse" GIFBUILDER object Example Typoscript: file = GIFBUILDER file { XY = 200,200 format = jpg quality = 100 10 = ELLIPSE 10.dimensions = 100,100,50,50 10.color = red

$workArea = X,Y $conf['dimensions'] = offset x, offset y, width of ellipse, height of ellipse

Parameters
resource$im‪GDlib image pointer
array$confTypoScript array with configuration for the GIFBUILDER object.
array$workArea‪The current working area coordinates.
See also
‪\TYPO3\CMS\Frontend\Imaging\GifBuilder::make()

Definition at line 1512 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\$im, TYPO3\CMS\Core\Imaging\GraphicalFunctions\$workArea, TYPO3\CMS\Core\Imaging\GraphicalFunctions\convertColor(), TYPO3\CMS\Core\Utility\GeneralUtility\intExplode(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\objPosition().

Referenced by TYPO3\CMS\Frontend\Imaging\GifBuilder\make().

◆ makeEmboss()

TYPO3\CMS\Core\Imaging\GraphicalFunctions::makeEmboss ( $im,
  $conf,
  $workArea,
  $txtConf 
)

Implements the "EMBOSS" GIFBUILDER object / property for the TEXT object

Parameters
resource$im‪GDlib image pointer
array$confTypoScript array with configuration for the GIFBUILDER object.
array$workArea‪The current working area coordinates.
array$txtConfTypoScript array with configuration for the associated TEXT GIFBUILDER object.
See also
‪\TYPO3\CMS\Frontend\Imaging\GifBuilder::make()
makeShadow()

Definition at line 1351 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\$workArea, TYPO3\CMS\Core\Utility\GeneralUtility\intExplode(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeShadow().

Referenced by TYPO3\CMS\Frontend\Imaging\GifBuilder\make().

◆ makeOutline()

TYPO3\CMS\Core\Imaging\GraphicalFunctions::makeOutline ( $im,
  $conf,
  $workArea,
  $txtConf 
)

Implements the "OUTLINE" GIFBUILDER object / property for the TEXT object

Parameters
resource$im‪GDlib image pointer
array$confTypoScript array with configuration for the GIFBUILDER object.
array$workArea‪The current working area coordinates.
array$txtConfTypoScript array with configuration for the associated TEXT GIFBUILDER object.
See also
‪\TYPO3\CMS\Frontend\Imaging\GifBuilder::make()
makeText()

Definition at line 1292 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\applyOffset(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\circleOffset(), TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeText().

Referenced by TYPO3\CMS\Frontend\Imaging\GifBuilder\make().

◆ makeShadow()

TYPO3\CMS\Core\Imaging\GraphicalFunctions::makeShadow ( $im,
  $conf,
  $workArea,
  $txtConf 
)

Implements the "SHADOW" GIFBUILDER object / property for the TEXT object The operation involves ImageMagick for combining.

Parameters
resource$im‪GDlib image pointer
array$confTypoScript array with configuration for the GIFBUILDER object.
array$workArea‪The current working area coordinates.
array$txtConfTypoScript array with configuration for the associated TEXT GIFBUILDER object.
See also
‪\TYPO3\CMS\Frontend\Imaging\GifBuilder::make()
makeText()
makeEmboss()

Definition at line 1375 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\$gifExtension, TYPO3\CMS\Core\Imaging\GraphicalFunctions\$h, TYPO3\CMS\Core\Imaging\GraphicalFunctions\$im, TYPO3\CMS\Core\Imaging\GraphicalFunctions\$w, TYPO3\CMS\Core\Imaging\GraphicalFunctions\$workArea, TYPO3\CMS\Core\Imaging\GraphicalFunctions\applyOffset(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\combineExec(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\convertColor(), TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\imagecopyresized(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\imageCreateFromFile(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\imageMagickExec(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\ImageWrite(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\inputLevels(), TYPO3\CMS\Core\Utility\GeneralUtility\intExplode(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeText(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\outputLevels(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\randomName(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\v5_blur().

Referenced by TYPO3\CMS\Frontend\Imaging\GifBuilder\make(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeEmboss().

◆ makeText()

TYPO3\CMS\Core\Imaging\GraphicalFunctions::makeText ( $im,
  $conf,
  $workArea 
)

Implements the "TEXT" GIFBUILDER object

Parameters
resource$im‪GDlib image pointer
array$confTypoScript array with configuration for the GIFBUILDER object.
array$workArea‪The current working area coordinates.
See also
‪\TYPO3\CMS\Frontend\Imaging\GifBuilder::make()

Definition at line 547 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\$gifExtension, TYPO3\CMS\Core\Imaging\GraphicalFunctions\$h, TYPO3\CMS\Core\Imaging\GraphicalFunctions\$im, TYPO3\CMS\Core\Imaging\GraphicalFunctions\$w, TYPO3\CMS\Core\Imaging\GraphicalFunctions\$workArea, TYPO3\CMS\Core\Imaging\GraphicalFunctions\addToMap(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\calcTextCordsForMap(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\calcWordSpacing(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\combineExec(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\convertColor(), TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\imageCreateFromFile(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\imageMagickExec(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\ImageWrite(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\randomName(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\renderTTFText(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\SpacedImageTTFText(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\txtPosition(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\v5_sharpen().

Referenced by TYPO3\CMS\Frontend\Imaging\GifBuilder\make(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeOutline(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeShadow().

◆ maskImageOntoImage()

TYPO3\CMS\Core\Imaging\GraphicalFunctions::maskImageOntoImage ( $im,
  $conf,
  $workArea 
)

Implements the "IMAGE" GIFBUILDER object, when the "mask" property is TRUE. It reads the two images defined by $conf['file'] and $conf['mask'] and copies the $conf['file'] onto the input image pointer image using the $conf['mask'] as a grayscale mask The operation involves ImageMagick for combining.

Parameters
resource$im‪GDlib image pointer
array$confTypoScript array with configuration for the GIFBUILDER object.
array$workArea‪The current working area coordinates.
See also
‪\TYPO3\CMS\Frontend\Imaging\GifBuilder::make()

Definition at line 332 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\$gifExtension, TYPO3\CMS\Core\Imaging\GraphicalFunctions\$h, TYPO3\CMS\Core\Imaging\GraphicalFunctions\$im, TYPO3\CMS\Core\Imaging\GraphicalFunctions\$w, TYPO3\CMS\Core\Imaging\GraphicalFunctions\$workArea, TYPO3\CMS\Core\Imaging\GraphicalFunctions\combineExec(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\copyGifOntoGif(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\getImageDimensions(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\imageCreateFromFile(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\imageMagickConvert(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\ImageWrite(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\randomName().

Referenced by TYPO3\CMS\Frontend\Imaging\GifBuilder\make().

◆ objPosition()

array TYPO3\CMS\Core\Imaging\GraphicalFunctions::objPosition (   $conf,
  $workArea,
  $BB 
)

Create an array with object position/boundaries based on input TypoScript configuration (such as the "align" property is used), the work area definition and $BB array

Parameters
array$confTypoScript configuration for a GIFBUILDER object
array$workArea‪Workarea definition
array$BB‪BB (Bounding box) array. Not just used for TEXT objects but also for others
Returns
‪array [0]=x, [1]=y, [2]=w, [3]=h
See also
copyGifOntoGif()
makeBox()
crop()

Definition at line 1994 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\$h, TYPO3\CMS\Core\Imaging\GraphicalFunctions\$w, TYPO3\CMS\Core\Imaging\GraphicalFunctions\$workArea, TYPO3\CMS\Core\Imaging\GraphicalFunctions\applyOffset(), and TYPO3\CMS\Core\Utility\GeneralUtility\intExplode().

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\copyGifOntoGif(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\crop(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeBox(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeEllipse().

◆ output()

string TYPO3\CMS\Core\Imaging\GraphicalFunctions::output (   $file)

Writing the internal image pointer, $this->im, to file based on the extension of the input filename Used in GIFBUILDER Uses $this->setup['reduceColors'] for gif/png images and $this->setup['quality'] for jpg images to reduce size/quality if needed.

Parameters
string$file‪The filename to write to.
Returns
‪string Returns input filename
See also
‪\TYPO3\CMS\Frontend\Imaging\GifBuilder::gifBuild()

Definition at line 2657 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\gifCompress(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\ImageWrite(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\IMreduceColors().

Referenced by TYPO3\CMS\Frontend\Imaging\GifBuilder\gifBuild().

◆ outputLevels()

TYPO3\CMS\Core\Imaging\GraphicalFunctions::outputLevels ( $im,
  $low,
  $high,
  $swap = false 
)

Apply output levels to input image pointer (decreasing contrast)

Parameters
resource$im‪GDlib Image Pointer
int$low‪The "low" value (close to 0)
int$high‪The "high" value (close to 255)
bool$swap‪If swap, then low and high are swapped. (Useful for negated masks...)

Definition at line 1785 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\$im, and TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange().

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\adjust(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeShadow().

◆ randomName()

◆ readPngGif()

static string null TYPO3\CMS\Core\Imaging\GraphicalFunctions::readPngGif (   $theFile,
  $output_png = false 
)
static

Returns filename of the png/gif version of the input file (which can be png or gif). If input file type does not match the wanted output type a conversion is made and temp-filename returned.

Parameters
string$theFile‪Filepath of image file
bool$output_png‪If TRUE, then input file is converted to PNG, otherwise to GIF
Returns
‪string|null If the new image file exists, its filepath is returned

Definition at line 2574 of file GraphicalFunctions.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\CommandUtility\escapeShellArgument(), TYPO3\CMS\Core\Utility\CommandUtility\exec(), TYPO3\CMS\Core\Utility\GeneralUtility\fixPermissions(), TYPO3\CMS\Core\Imaging\ImageMagickFile\fromFilePath(), TYPO3\CMS\Core\Core\Environment\getPublicPath(), TYPO3\CMS\Core\Utility\CommandUtility\imageMagickCommand(), and TYPO3\CMS\Core\Utility\GeneralUtility\mkdir_deep().

◆ renderTTFText()

TYPO3\CMS\Core\Imaging\GraphicalFunctions::renderTTFText ( $im,
  $fontSize,
  $angle,
  $x,
  $y,
  $color,
  $fontFile,
  $string,
  $splitRendering,
  $conf,
  $sF = 1 
)
protected

Renders a regular text and takes care of a possible line break automatically.

Parameters
resource$im‪(See argument for PHP function imageTTFtext())
int$fontSize‪(See argument for PHP function imageTTFtext())
int$angle‪(See argument for PHP function imageTTFtext())
int$x‪(See argument for PHP function imageTTFtext())
int$y‪(See argument for PHP function imageTTFtext())
int$color‪(See argument for PHP function imageTTFtext())
string$fontFile‪(See argument for PHP function imageTTFtext())
string$string‪(See argument for PHP function imageTTFtext()). UTF-8 string, possibly with entities in.
array$splitRendering‪Split-rendering configuration
array$conf‪The configuration
int$sF‪Scale factor

Definition at line 1185 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\getBreakSpace(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\getRenderedTextWidth(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\getWordPairsForLineBreak(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\ImageTTFTextWrapper().

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeText().

◆ scale()

TYPO3\CMS\Core\Imaging\GraphicalFunctions::scale ( $im,
  $conf 
)

◆ setImageFileExt()

TYPO3\CMS\Core\Imaging\GraphicalFunctions::setImageFileExt ( array  $imageFileExt)
Parameters
array$imageFileExt

Only used for ext:install, not part of TYPO3 Core API.

Definition at line 1165 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\$imageFileExt.

◆ setWorkArea()

TYPO3\CMS\Core\Imaging\GraphicalFunctions::setWorkArea (   $workArea)

Implements the "WORKAREA" GIFBUILDER object when setting it Setting internal working area boundaries (->workArea)

Parameters
string$workArea‪Working area dimensions, comma separated
See also
‪\TYPO3\CMS\Frontend\Imaging\GifBuilder::make()

Definition at line 1733 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\$h, TYPO3\CMS\Core\Imaging\GraphicalFunctions\$w, TYPO3\CMS\Core\Imaging\GraphicalFunctions\$workArea, TYPO3\CMS\Core\Imaging\GraphicalFunctions\applyOffset(), and TYPO3\CMS\Core\Utility\GeneralUtility\intExplode().

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\crop(), TYPO3\CMS\Frontend\Imaging\GifBuilder\make(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\scale(), and TYPO3\CMS\Frontend\Imaging\GifBuilder\start().

◆ SpacedImageTTFText()

TYPO3\CMS\Core\Imaging\GraphicalFunctions::SpacedImageTTFText ( $im,
  $fontSize,
  $angle,
  $x,
  $y,
  $Fcolor,
  $fontFile,
  $text,
  $spacing,
  $wordSpacing,
  $splitRenderingConf,
  $sF = 1 
)

Printing text onto an image like the PHP function imageTTFText does but in addition it offers options for spacing of letters and words. Spacing is done by printing one char at a time and this means that the spacing is rather uneven and probably not very nice. See

Parameters
resource$im‪(See argument for PHP function imageTTFtext())
int$fontSize‪(See argument for PHP function imageTTFtext())
int$angle‪(See argument for PHP function imageTTFtext())
int$x‪(See argument for PHP function imageTTFtext())
int$y‪(See argument for PHP function imageTTFtext())
int$Fcolor‪(See argument for PHP function imageTTFtext())
string$fontFile‪(See argument for PHP function imageTTFtext())
string$text‪(See argument for PHP function imageTTFtext()). UTF-8 string, possibly with entities in.
int$spacing‪The spacing of letters in pixels
int$wordSpacing‪The spacing of words in pixels
array$splitRenderingConf‪Array
int$sF‪Scale factor

Definition at line 835 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\ImageTTFBBoxWrapper(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\ImageTTFTextWrapper().

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeText().

◆ splitString()

array TYPO3\CMS\Core\Imaging\GraphicalFunctions::splitString (   $string,
  $splitRendering,
  $fontSize,
  $fontFile 
)

Splitting a string for ImageTTFBBox up into an array where each part has its own configuration options.

Parameters
string$string‪UTF-8 string
array$splitRendering‪Split-rendering configuration from GIFBUILDER TEXT object.
int$fontSize‪Current fontsize
string$fontFile‪Current font file
Returns
‪array Array with input string splitted according to configuration

Definition at line 995 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Utility\ArrayUtility\filterAndSortByNumericKeys(), TYPO3\CMS\Core\Utility\GeneralUtility\intExplode(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\ImageTTFBBoxWrapper(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\ImageTTFTextWrapper().

◆ txtPosition()

array TYPO3\CMS\Core\Imaging\GraphicalFunctions::txtPosition (   $conf,
  $workArea,
  $BB 
)

Calculates text position for printing the text onto the image based on configuration like alignment and workarea.

Parameters
array$confTypoScript array for the TEXT GIFBUILDER object
array$workArea‪Work area definition
array$BB‪Bounding box information, was set in \TYPO3\CMS\Frontend\Imaging\GifBuilder::start()
Returns
‪array [0]=x, [1]=y, [2]=w, [3]=h
See also
makeText()

Definition at line 646 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\$w, TYPO3\CMS\Core\Imaging\GraphicalFunctions\$workArea, TYPO3\CMS\Core\Imaging\GraphicalFunctions\applyOffset(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\calcBBox(), and TYPO3\CMS\Core\Utility\GeneralUtility\intExplode().

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeText().

◆ unifyColors()

int TYPO3\CMS\Core\Imaging\GraphicalFunctions::unifyColors ( $img,
  $colArr,
  $closest = false 
)

Unifies all colors given in the colArr color array to the first color in the array.

Parameters
resource$img‪Image resource
array$colArr‪Array containing RGB color arrays
bool$closest
Returns
‪int The index of the unified color

Definition at line 2831 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Imaging\GraphicalFunctions\convertColor(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\hexColor(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\imageCreateFromFile(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\imageMagickExec(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\ImageWrite(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\randomName().

Referenced by TYPO3\CMS\Frontend\Imaging\GifBuilder\make().

◆ v5_blur()

string TYPO3\CMS\Core\Imaging\GraphicalFunctions::v5_blur (   $factor)

Returns the IM command for blurring with ImageMagick 5. Uses $this->im5fx_blurSteps for translation of the factor to an actual command.

Parameters
int$factor‪The blurring factor, 0-100 (effectively in 10 steps)
Returns
‪string The blurring command, eg. " -blur 3x4
See also
makeText()
IMparams()
v5_sharpen()

Definition at line 1894 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange().

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\IMparams(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeShadow().

◆ v5_sharpen()

string TYPO3\CMS\Core\Imaging\GraphicalFunctions::v5_sharpen (   $factor)

Returns the IM command for sharpening with ImageMagick 5 Uses $this->im5fx_sharpenSteps for translation of the factor to an actual command.

Parameters
int$factor‪The sharpening factor, 0-100 (effectively in 10 steps)
Returns
‪string The sharpening command, eg. " -sharpen 3x4
See also
makeText()
IMparams()
v5_blur()

Definition at line 1873 of file GraphicalFunctions.php.

References TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange().

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\__construct(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\IMparams(), and TYPO3\CMS\Core\Imaging\GraphicalFunctions\makeText().

Member Data Documentation

◆ $addFrameSelection

bool TYPO3\CMS\Core\Imaging\GraphicalFunctions::$addFrameSelection = true

If set, the frame pointer is appended to the filenames.

Definition at line 42 of file GraphicalFunctions.php.

◆ $allowedColorSpaceNames

array TYPO3\CMS\Core\Imaging\GraphicalFunctions::$allowedColorSpaceNames
protected
Initial value:
= array(
'CMY',
'CMYK',
'Gray',
'HCL',
'HSB',
'HSL',
'HWB',
'Lab',
'LCH',
'LMS',
'Log',
'Luv',
'OHTA',
'Rec601Luma',
'Rec601YCbCr',
'Rec709Luma',
'Rec709YCbCr',
'RGB',
'sRGB',
'Transparent',
'XYZ',
'YCbCr',
'YCC',
'YIQ',
'YCbCr',
'YUV',
)

colorspace names allowed

Definition at line 66 of file GraphicalFunctions.php.

◆ $alternativeOutputKey

string TYPO3\CMS\Core\Imaging\GraphicalFunctions::$alternativeOutputKey = ''

For debugging only. Filenames will not be based on mtime and only filename (not path) will be used. This key is also included in the hash of the filename...

Definition at line 168 of file GraphicalFunctions.php.

◆ $cmds

array TYPO3\CMS\Core\Imaging\GraphicalFunctions::$cmds
Initial value:
= array(
'jpg' => '',
'jpeg' => '',
'gif' => '',
'png' => '',
)

Definition at line 122 of file GraphicalFunctions.php.

◆ $colMap

array TYPO3\CMS\Core\Imaging\GraphicalFunctions::$colMap
protected
Initial value:
= array(
'aqua' => [0, 255, 255],
'black' => [0, 0, 0],
'blue' => [0, 0, 255],
'fuchsia' => [255, 0, 255],
'gray' => [128, 128, 128],
'green' => [0, 128, 0],
'lime' => [0, 255, 0],
'maroon' => [128, 0, 0],
'navy' => [0, 0, 128],
'olive' => [128, 128, 0],
'purple' => [128, 0, 128],
'red' => [255, 0, 0],
'silver' => [192, 192, 192],
'teal' => [0, 128, 128],
'yellow' => [255, 255, 0],
'white' => [255, 255, 255],
)

Array mapping HTML color names to RGB values.

Definition at line 214 of file GraphicalFunctions.php.

◆ $colorspace

string TYPO3\CMS\Core\Imaging\GraphicalFunctions::$colorspace = 'RGB'
protected

defines the RGB colorspace to use

Definition at line 60 of file GraphicalFunctions.php.

◆ $csConvObj

CharsetConverter TYPO3\CMS\Core\Imaging\GraphicalFunctions::$csConvObj
protected

Charset conversion object:

Definition at line 237 of file GraphicalFunctions.php.

◆ $dontCheckForExistingTempFile

bool TYPO3\CMS\Core\Imaging\GraphicalFunctions::$dontCheckForExistingTempFile = false

This flag should always be FALSE. If set TRUE, imageMagickConvert will always write a new file to the tempdir! Used for debugging.

Definition at line 154 of file GraphicalFunctions.php.

◆ $dontCompress

bool TYPO3\CMS\Core\Imaging\GraphicalFunctions::$dontCompress = false

Prevents imageMagickConvert() from compressing the gif-files with self::gifCompress()

Definition at line 160 of file GraphicalFunctions.php.

◆ $filenamePrefix

string TYPO3\CMS\Core\Imaging\GraphicalFunctions::$filenamePrefix = ''

Filename prefix for images scaled in imageMagickConvert()

Definition at line 142 of file GraphicalFunctions.php.

◆ $gdlibExtensions

array TYPO3\CMS\Core\Imaging\GraphicalFunctions::$gdlibExtensions = array( )
protected

File formats supported by gdlib. This variable get's filled in "init" method

Definition at line 54 of file GraphicalFunctions.php.

◆ $gifExtension

◆ $h

◆ $im

◆ $im5fx_blurSteps

string TYPO3\CMS\Core\Imaging\GraphicalFunctions::$im5fx_blurSteps = '1x2,2x2,3x2,4x3,5x3,5x4,6x4,7x5,8x5,9x5'
protected

Used by v5_blur() to simulate 10 continuous steps of blurring

Definition at line 196 of file GraphicalFunctions.php.

◆ $im5fx_sharpenSteps

string TYPO3\CMS\Core\Imaging\GraphicalFunctions::$im5fx_sharpenSteps = '1x2,2x2,3x2,2x3,3x3,4x3,3x4,4x4,4x5,5x5'
protected

Used by v5_sharpen() to simulate 10 continuous steps of sharpening.

Definition at line 202 of file GraphicalFunctions.php.

◆ $IM_commands

array TYPO3\CMS\Core\Imaging\GraphicalFunctions::$IM_commands = array( )

All ImageMagick commands executed is stored in this array for tracking. Used by the Install Tools Image section

Definition at line 174 of file GraphicalFunctions.php.

◆ $imageFileExt

array TYPO3\CMS\Core\Imaging\GraphicalFunctions::$imageFileExt = array( 'gif', 'jpg', 'jpeg', 'png', 'tif', 'bmp', 'tga', 'pcx', 'ai', 'pdf', 'webp' )
protected

Allowed file extensions perceived as images by TYPO3. List should be set to 'gif,png,jpeg,jpg' if IM is not available.

Definition at line 106 of file GraphicalFunctions.php.

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\setImageFileExt().

◆ $imageMagickConvert_forceFileNameBody

string TYPO3\CMS\Core\Imaging\GraphicalFunctions::$imageMagickConvert_forceFileNameBody = ''

Forcing the output filename of imageMagickConvert() to this value. However after calling imageMagickConvert() it will be set blank again.

Definition at line 148 of file GraphicalFunctions.php.

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\imageMagickConvert().

◆ $jpegQuality

int TYPO3\CMS\Core\Imaging\GraphicalFunctions::$jpegQuality = 85
protected

◆ $map

string TYPO3\CMS\Core\Imaging\GraphicalFunctions::$map = ''

◆ $mayScaleUp

bool TYPO3\CMS\Core\Imaging\GraphicalFunctions::$mayScaleUp = true
protected

Definition at line 136 of file GraphicalFunctions.php.

◆ $OFFSET

array TYPO3\CMS\Core\Imaging\GraphicalFunctions::$OFFSET
protected

◆ $pixelLimitGif

int TYPO3\CMS\Core\Imaging\GraphicalFunctions::$pixelLimitGif = 10000
protected

This is the limit for the number of pixels in an image before it will be rendered as JPG instead of GIF/PNG

Definition at line 208 of file GraphicalFunctions.php.

◆ $processorEffectsEnabled

bool TYPO3\CMS\Core\Imaging\GraphicalFunctions::$processorEffectsEnabled = false
protected

Enable ImageMagick effects, disabled by default as IM5+ effects slow down the image generation

Definition at line 118 of file GraphicalFunctions.php.

◆ $processorEnabled

bool TYPO3\CMS\Core\Imaging\GraphicalFunctions::$processorEnabled
protected

Whether ImageMagick/GraphicsMagick is enabled or not

Definition at line 132 of file GraphicalFunctions.php.

◆ $saveAlphaLayer

bool TYPO3\CMS\Core\Imaging\GraphicalFunctions::$saveAlphaLayer = false
protected

Preserve the alpha transparency layer of read PNG images

Definition at line 184 of file GraphicalFunctions.php.

◆ $scalecmd

string TYPO3\CMS\Core\Imaging\GraphicalFunctions::$scalecmd = '-auto-orient -geometry'

ImageMagick scaling command; "-auto-orient -geometry" or "-auto-orient -sample". Used in makeText() and imageMagickConvert()

Definition at line 190 of file GraphicalFunctions.php.

◆ $setup

array TYPO3\CMS\Core\Imaging\GraphicalFunctions::$setup = array( )

This holds the operational setup. Basically this is a TypoScript array with properties.

Definition at line 252 of file GraphicalFunctions.php.

Referenced by TYPO3\CMS\Core\Imaging\GraphicalFunctions\adjust(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\IMparams(), and TYPO3\CMS\Frontend\Imaging\GifBuilder\start().

◆ $truecolorColors

int TYPO3\CMS\Core\Imaging\GraphicalFunctions::$truecolorColors = 16777215

16777216 Colors is the maximum value for PNG, JPEG truecolor images (24-bit, 8-bit / Channel)

Definition at line 99 of file GraphicalFunctions.php.

◆ $w

◆ $webImageExt

array TYPO3\CMS\Core\Imaging\GraphicalFunctions::$webImageExt = array( 'gif', 'jpg', 'jpeg', 'png' )
protected

Web image extensions (can be shown by a webbrowser)

Definition at line 112 of file GraphicalFunctions.php.

◆ $workArea