t3lib_stdGraphic Class Reference

Inheritance diagram for t3lib_stdGraphic:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 init ()
 maskImageOntoImage (&$im, $conf, $workArea)
 copyImageOntoImage (&$im, $conf, $workArea)
 copyGifOntoGif (&$im, $cpImg, $conf, $workArea)
 imagecopyresized (&$im, $cpImg, $Xstart, $Ystart, $cpImgCutX, $cpImgCutY, $w, $h, $w, $h)
 makeText (&$im, $conf, $workArea)
 txtPosition ($conf, $workArea, $BB)
 calcBBox ($conf)
 addToMap ($cords, $conf)
 calcTextCordsForMap ($cords, $offset, $conf)
 SpacedImageTTFText (&$im, $fontSize, $angle, $x, $y, $Fcolor, $fontFile, $text, $spacing, $wordSpacing, $splitRenderingConf, $sF=1)
 fontResize ($conf)
 ImageTTFBBoxWrapper ($fontSize, $angle, $fontFile, $string, $splitRendering, $sF=1)
 ImageTTFTextWrapper ($im, $fontSize, $angle, $x, $y, $color, $fontFile, $string, $splitRendering, $sF=1)
 splitString ($string, $splitRendering, $fontSize, $fontFile)
 calcWordSpacing ($conf, $scaleFactor=1)
 getTextScalFactor ($conf)
 makeOutline (&$im, $conf, $workArea, $txtConf)
 circleOffset ($distance, $iterations)
 makeEmboss (&$im, $conf, $workArea, $txtConf)
 makeShadow (&$im, $conf, $workArea, $txtConf)
 makeBox (&$im, $conf, $workArea)
 makeEffect (&$im, $conf)
 IMparams ($setup)
 adjust (&$im, $conf)
 crop (&$im, $conf)
 scale (&$im, $conf)
 setWorkArea ($workArea)
 autolevels (&$im)
 outputLevels (&$im, $low, $high, $swap='')
 inputLevels (&$im, $low, $high, $swap='')
 reduceColors (&$im, $limit, $cols)
 IMreduceColors ($file, $cols)
 prependAbsolutePath ($fontFile)
 v5_sharpen ($factor)
 v5_blur ($factor)
 randomName ()
 applyOffset ($cords, $OFFSET)
 convertColor ($string)
 recodeString ($string)
 singleChars ($theText, $returnUnicodeNumber=FALSE)
 objPosition ($conf, $workArea, $BB)
 imageMagickConvert ($imagefile, $newExt='', $w='', $h='', $params='', $frame='', $options='', $mustCreate=0)
 getImageDimensions ($imageFile)
 cacheImageDimensions ($identifyResult)
 getCachedImageDimensions ($imageFile)
 getImageScale ($info, $w, $h, $options)
 file_exists_typo3temp_file ($output, $orig='')
 imageMagickIdentify ($imagefile)
 imageMagickExec ($input, $output, $params)
 combineExec ($input, $overlay, $mask, $output, $handleNegation=false)
 wrapFileName ($inputName)
 checkFile ($file)
 createTempSubDir ($dirName)
 applyImageMagickToPHPGif (&$im, $command)
 gif_or_jpg ($type, $w, $h)
 output ($file)
 destroy ()
 imgTag ($imgInfo)
 ImageWrite ($destImg, $theImage, $quality=0)
 imageGif ($destImg, $theImage)
 imageCreateFromGif ($sourceImg)
 imageCreateFromFile ($sourceImg)
 imagecreate ($w, $h)
 hexColor ($col)
 unifyColors (&$img, $colArr, $closest=false)

Public Attributes

 $combineScript = 'combine'
 $noFramePrepended = 0
 $GD2 = 0
 $imagecopyresized_fix = 0
 $gifExtension = 'gif'
 $gdlibExtensions = ''
 $truecolor = true
 $png_truecolor = false
 $truecolorColors = 0xffffff
 $TTFLocaleConv = ''
 $enable_typo3temp_db_tracking = 0
 $imageFileExt = 'gif,jpg,jpeg,png,tif,bmp,tga,pcx,ai,pdf'
 $webImageExt = 'gif,jpg,jpeg,png'
 $maskNegate = ''
 $NO_IM_EFFECTS = ''
 $cmds
 $NO_IMAGE_MAGICK = ''
 $V5_EFFECTS = 0
 $im_version_4 = 0
 $mayScaleUp = 1
 $filenamePrefix = ''
 $imageMagickConvert_forceFileNameBody = ''
 $dontCheckForExistingTempFile = 0
 $dontCompress = 0
 $dontUnlinkTempFiles = 0
 $alternativeOutputKey = ''
 $IM_commands = Array()
 $workArea = Array()
 $tempPath = 'typo3temp/'
 $absPrefix = ''
 $scalecmd = '-geometry'
 $im5fx_blurSteps = '1x2,2x2,3x2,4x3,5x3,5x4,6x4,7x5,8x5,9x5'
 $im5fx_sharpenSteps = '1x2,2x2,3x2,2x3,3x3,4x3,3x4,4x4,4x5,5x5'
 $pixelLimitGif = 10000
 $colMap
 $csConvObj
 $nativeCharset = ''

Detailed Description

Definition at line 155 of file class.t3lib_stdgraphic.php.


Member Function Documentation

t3lib_stdGraphic::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 Coordinates for a polygon image map as created by ->calcTextCordsForMap()
array Configuration for "imgMap." property of a TEXT GIFBUILDER object.
Returns:
void private
See also:
makeText(), calcTextCordsForMap()

Definition at line 824 of file class.t3lib_stdgraphic.php.

Referenced by makeText().

t3lib_stdGraphic::adjust ( &$  im,
conf 
)

Implements the "ADJUST" GIFBUILDER object

Parameters:
pointer GDlib image pointer
array TypoScript array with configuration for the GIFBUILDER object.
Returns:
void
See also:
tslib_gifBuilder::make(), autoLevels(), outputLevels(), inputLevels()

Definition at line 1593 of file class.t3lib_stdgraphic.php.

References $val, $value, autolevels(), inputLevels(), t3lib_div::intExplode(), and outputLevels().

Referenced by tslib_gifBuilder::make().

t3lib_stdGraphic::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:
pointer The image pointer (reference)
string The ImageMagick parameters. Like effects, scaling etc.
Returns:
void

Definition at line 2647 of file class.t3lib_stdgraphic.php.

References imageCreateFromFile(), imageMagickExec(), ImageWrite(), and randomName().

Referenced by makeEffect().

t3lib_stdGraphic::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 Integer coordinates in key 0/1
array Offset values in key 0/1
Returns:
array Modified $cords array

Definition at line 1942 of file class.t3lib_stdgraphic.php.

Referenced by makeOutline(), makeShadow(), objPosition(), setWorkArea(), and txtPosition().

t3lib_stdGraphic::autolevels ( &$  im  ) 

Apply auto-levels to input image pointer

Parameters:
integer GDlib Image Pointer
Returns:
void

Definition at line 1729 of file class.t3lib_stdgraphic.php.

Referenced by adjust().

t3lib_stdGraphic::cacheImageDimensions ( identifyResult  ) 

Cache 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:
boolean True if operation was successful
Author:
Michael Stucki <michael@typo3.org> / Robert Lemke <rl@robertlemke.de>

Definition at line 2256 of file class.t3lib_stdgraphic.php.

References $TYPO3_DB.

Referenced by getImageDimensions().

t3lib_stdGraphic::calcBBox ( conf  ) 

Calculates bounding box information for the TEXT GIFBUILDER object.

Parameters:
array TypoScript array for the TEXT GIFBUILDER object
Returns:
array Array with three keys [0]/[1] being x/y and [2] being the bounding box array private
See also:
txtPosition(), tslib_gifBuilder::start()

Definition at line 765 of file class.t3lib_stdgraphic.php.

References $key, $val, calcWordSpacing(), getTextScalFactor(), ImageTTFBBoxWrapper(), recodeString(), and singleChars().

Referenced by tslib_gifBuilder::start(), and txtPosition().

t3lib_stdGraphic::calcTextCordsForMap ( cords,
offset,
conf 
)

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

Parameters:
array Coordinates (from BBOX array)
array Offset array
array Configuration for "imgMap." property of a TEXT GIFBUILDER object.
Returns:
array private
See also:
makeText(), calcTextCordsForMap()

Definition at line 847 of file class.t3lib_stdgraphic.php.

References t3lib_div::intExplode().

Referenced by makeText().

t3lib_stdGraphic::calcWordSpacing ( conf,
scaleFactor = 1 
)

Calculates the spacing and wordSpacing values

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

Definition at line 1212 of file class.t3lib_stdgraphic.php.

Referenced by calcBBox(), fontResize(), and makeText().

t3lib_stdGraphic::checkFile ( file  ) 

Returns true if the input file existed

Parameters:
string Input file to check
Returns:
string Returns the filename if the file existed, otherwise empty.

Reimplemented in tslib_gifBuilder.

Definition at line 2611 of file class.t3lib_stdgraphic.php.

t3lib_stdGraphic::circleOffset ( distance,
iterations 
)

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

access private

Parameters:
integer Distance
integer Iterations.
Returns:
array
See also:
makeOutline()

Definition at line 1295 of file class.t3lib_stdgraphic.php.

References $res.

Referenced by makeOutline().

t3lib_stdGraphic::combineExec ( input,
overlay,
mask,
output,
handleNegation = false 
)

Executes a 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 The relative (to PATH_site) image filepath, bottom file
string The relative (to PATH_site) image filepath, overlay file (top)
string The relative (to PATH_site) image filepath, the mask file (grayscale)
string The relative (to PATH_site) image filepath, output filename (written to)
[type] $handleNegation: ...
Returns:
void

Definition at line 2539 of file class.t3lib_stdgraphic.php.

References t3lib_div::fixPermissions(), t3lib_div::imageMagickCommand(), imageMagickExec(), randomName(), and wrapFileName().

Referenced by makeShadow(), makeText(), and maskImageOntoImage().

t3lib_stdGraphic::convertColor ( string  ) 

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

Parameters:
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 1955 of file class.t3lib_stdgraphic.php.

References $val, and t3lib_div::intInRange().

Referenced by crop(), ImageTTFTextWrapper(), tslib_gifBuilder::make(), makeBox(), makeShadow(), makeText(), and unifyColors().

t3lib_stdGraphic::copyGifOntoGif ( &$  im,
cpImg,
conf,
workArea 
)

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

Parameters:
pointer GDlib image pointer, destination (bottom image)
pointer GDlib image pointer, source (top image)
array TypoScript array with the properties for the IMAGE GIFBUILDER object. Only used for the "tile" property value.
array Work area
Returns:
void Works on the $im image pointer private

Definition at line 462 of file class.t3lib_stdgraphic.php.

References $workArea, imagecopyresized(), t3lib_div::intExplode(), t3lib_div::intInRange(), and objPosition().

Referenced by copyImageOntoImage(), crop(), and maskImageOntoImage().

t3lib_stdGraphic::copyImageOntoImage ( &$  im,
conf,
workArea 
)

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

Parameters:
pointer GDlib image pointer
array TypoScript array with configuration for the GIFBUILDER object.
array The current working area coordinates.
Returns:
void
See also:
tslib_gifBuilder::make(), maskImageOntoImage()

Definition at line 440 of file class.t3lib_stdgraphic.php.

References $workArea, copyGifOntoGif(), imageCreateFromFile(), imageMagickConvert(), and t3lib_div::inList().

Referenced by tslib_gifBuilder::make().

t3lib_stdGraphic::createTempSubDir ( dirName  ) 

Creates subdirectory in typo3temp/ if not already found.

Parameters:
string Name of sub directory
Returns:
boolean Result of t3lib_div::mkdir(), true if it went well.

Definition at line 2625 of file class.t3lib_stdgraphic.php.

References t3lib_div::isFirstPartOfStr(), and t3lib_div::mkdir().

Referenced by tslib_gifBuilder::gifBuild(), imageMagickConvert(), and randomName().

t3lib_stdGraphic::crop ( &$  im,
conf 
)

Implements the "CROP" GIFBUILDER object

Parameters:
pointer GDlib image pointer
array TypoScript array with configuration for the GIFBUILDER object.
Returns:
void
See also:
tslib_gifBuilder::make()

Definition at line 1625 of file class.t3lib_stdgraphic.php.

References $workArea, convertColor(), copyGifOntoGif(), imagecreate(), t3lib_div::intExplode(), objPosition(), and setWorkArea().

Referenced by imageMagickConvert(), tslib_gifBuilder::make(), and tslib_gifBuilder::start().

t3lib_stdGraphic::destroy (  ) 

Destroy internal image pointer, $this->im

Returns:
void
See also:
tslib_gifBuilder::gifBuild()

Definition at line 2730 of file class.t3lib_stdgraphic.php.

Referenced by tslib_gifBuilder::gifBuild().

t3lib_stdGraphic::file_exists_typo3temp_file ( output,
orig = '' 
)

Used to check if a certain process of scaling an image is already being carried out (can be logged in the SQL database)

Parameters:
string Output imagefile
string Original basis file
Returns:
boolean Returns true if the file is already being made; thus "true" means "Don't render the image again" private

Definition at line 2420 of file class.t3lib_stdgraphic.php.

References $GLOBALS, $res, and $row.

Referenced by imageMagickConvert().

t3lib_stdGraphic::fontResize ( conf  ) 

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

Parameters:
array The TypoScript properties of the TEXT GIFBUILDER object
Returns:
integer The new fontSize private
Author:
Rene Fritz <r.fritz@colorcube.de>
See also:
tslib_gifBuilder::start()

Definition at line 919 of file class.t3lib_stdgraphic.php.

References calcWordSpacing(), ImageTTFBBoxWrapper(), and recodeString().

Referenced by tslib_gifBuilder::start().

t3lib_stdGraphic::getCachedImageDimensions ( imageFile  ) 

Fetch the cached imageDimensions from the MySQL database. Does not check if the image file exists!

Parameters:
string The image filepath
Returns:
array Returns an array where [0]/[1] is w/h, [2] is extension and [3] is the filename.
Author:
Michael Stucki <michael@typo3.org> / Robert Lemke <rl@robertlemke.de>

Definition at line 2284 of file class.t3lib_stdgraphic.php.

References $res, $row, and $TYPO3_DB.

Referenced by getImageDimensions().

t3lib_stdGraphic::getImageDimensions ( imageFile  ) 

Gets the input image dimensions.

Parameters:
string The image filepath
Returns:
array Returns an array where [0]/[1] is w/h, [2] is extension and [3] is the filename.
See also:
imageMagickConvert(), tslib_cObj::getImgResource()

Definition at line 2228 of file class.t3lib_stdgraphic.php.

References cacheImageDimensions(), getCachedImageDimensions(), imageMagickIdentify(), and t3lib_div::inList().

Referenced by imageMagickConvert(), and maskImageOntoImage().

t3lib_stdGraphic::getImageScale ( info,
w,
h,
options 
)

Get numbers for scaling the image based on input

Parameters:
array Current image information: Width, Height etc.
integer "required" width
integer "required" height
array Options: Keys are like "maxW", "maxH", "minW", "minH"
Returns:
array private
See also:
imageMagickConvert()

Definition at line 2314 of file class.t3lib_stdgraphic.php.

Referenced by imageMagickConvert().

t3lib_stdGraphic::getTextScalFactor ( conf  ) 

Calculates and returns the niceText.scaleFactor

Parameters:
array TypoScript array for the TEXT GIFBUILDER object
Returns:
integer TypoScript value from eg $conf['niceText.']['scaleFactor'] private

Definition at line 1231 of file class.t3lib_stdgraphic.php.

References t3lib_div::intInRange().

Referenced by calcBBox().

t3lib_stdGraphic::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 The file extension, lowercase.
integer The width of the output image.
integer The height of the output image.
Returns:
string The filename, either "jpg" or "gif"/"png" (whatever $this->gifExtension is set to.)

Definition at line 2673 of file class.t3lib_stdgraphic.php.

Referenced by imageMagickConvert().

t3lib_stdGraphic::hexColor ( col  ) 

Returns the HEX color value for an RGB color array

Parameters:
array RGB color array
Returns:
string HEX color value

Definition at line 2871 of file class.t3lib_stdgraphic.php.

Referenced by unifyColors().

t3lib_stdGraphic::imagecopyresized ( &$  im,
cpImg,
Xstart,
Ystart,
cpImgCutX,
cpImgCutY,
w,
h,
w,
h 
)

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.

For parameters, see PHP function "imagecopyresized()"

Parameters:
pointer see PHP function "imagecopyresized()"
pointer see PHP function "imagecopyresized()"
integer see PHP function "imagecopyresized()"
integer see PHP function "imagecopyresized()"
integer see PHP function "imagecopyresized()"
integer see PHP function "imagecopyresized()"
integer see PHP function "imagecopyresized()"
integer see PHP function "imagecopyresized()"
integer see PHP function "imagecopyresized()"
integer see PHP function "imagecopyresized()"
Returns:
void private
See also:
t3lib_iconWorks::imagecopyresized()

Definition at line 541 of file class.t3lib_stdgraphic.php.

References imagecreate(), t3lib_div::intInRange(), makeEffect(), and reduceColors().

Referenced by copyGifOntoGif(), and makeShadow().

t3lib_stdGraphic::imagecreate ( w,
h 
)

Creates a new GD image resource. Wrapper for imagecreate(truecolor) depended if GD2 is used.

Parameters:
integer Width of image
integer Height of image
Returns:
pointer Image Resource pointer

Definition at line 2856 of file class.t3lib_stdgraphic.php.

Referenced by crop(), imagecopyresized(), imageCreateFromFile(), tslib_gifBuilder::make(), makeShadow(), makeText(), and maskImageOntoImage().

t3lib_stdGraphic::imageCreateFromFile ( sourceImg  ) 

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

Parameters:
string Image filename
Returns:
pointer Image Resource pointer

Definition at line 2817 of file class.t3lib_stdgraphic.php.

References imagecreate(), and imageCreateFromGif().

Referenced by applyImageMagickToPHPGif(), copyImageOntoImage(), imageCreateFromGif(), makeShadow(), makeText(), maskImageOntoImage(), scale(), and unifyColors().

t3lib_stdGraphic::imageCreateFromGif ( sourceImg  ) 

This function has been renamed and only exists for providing backwards compatibility. Please use $this->imageCreateFromFile() instead.

Parameters:
string Image filename
Returns:
pointer Image Resource pointer
Deprecated:
since TYPO3 4.0

Definition at line 2806 of file class.t3lib_stdgraphic.php.

References imageCreateFromFile().

Referenced by imageCreateFromFile().

t3lib_stdGraphic::imageGif ( destImg,
theImage 
)

Writes the input GDlib image pointer to file. Now just a wrapper to ImageWrite.

Parameters:
pointer The GDlib image resource pointer
string The filename to write to
Returns:
mixed The output of either imageGif, imagePng or imageJpeg based on the filename to write
See also:
imageWrite()
Deprecated:
since TYPO3 4.0

Definition at line 2794 of file class.t3lib_stdgraphic.php.

Referenced by ImageWrite().

t3lib_stdGraphic::imageMagickConvert ( imagefile,
newExt = '',
w = '',
h = '',
params = '',
frame = '',
options = '',
mustCreate = 0 
)

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

Parameters:
string The image filepath
string 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 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 Height. See $w
string Additional ImageMagick parameters.
string 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 An array with options passed to getImageScale (see this function).
boolean If set, then another image than the input imagefile MUST be returned. Otherwise you can risk that the input image is good enough regarding messures etc and is of course not rendered to a new, temporary file in typo3temp/. But this option will force it to.
Returns:
array [0]/[1] is w/h, [2] is file extension and [3] is the filename.
See also:
getImageScale(), typo3/show_item.php, fileList_ext::renderImage(), tslib_cObj::getImgResource(), SC_tslib_showpic::show(), maskImageOntoImage(), copyImageOntoImage(), scale()

Definition at line 2130 of file class.t3lib_stdgraphic.php.

References $GLOBALS, createTempSubDir(), crop(), file_exists_typo3temp_file(), getImageDimensions(), getImageScale(), t3lib_div::gif_compress(), gif_or_jpg(), imageMagickExec(), t3lib_div::inList(), and t3lib_div::shortMD5().

Referenced by copyImageOntoImage(), maskImageOntoImage(), and scale().

t3lib_stdGraphic::imageMagickExec ( input,
output,
params 
)

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

Parameters:
string The relative (to PATH_site) image filepath, input file (read from)
string The relative (to PATH_site) image filepath, output filename (written to)
string ImageMagick parameters
Returns:
string The result of a call to PHP function "exec()"

Definition at line 2516 of file class.t3lib_stdgraphic.php.

References t3lib_div::fixPermissions(), t3lib_div::imageMagickCommand(), and wrapFileName().

Referenced by applyImageMagickToPHPGif(), combineExec(), imageMagickConvert(), IMreduceColors(), makeShadow(), makeText(), and unifyColors().

t3lib_stdGraphic::imageMagickIdentify ( imagefile  ) 

Returns an array where [0]/[1] is w/h, [2] is extension and [3] is the filename. Using ImageMagick

Parameters:
string The relative (to PATH_site) image filepath
Returns:
array

Definition at line 2481 of file class.t3lib_stdgraphic.php.

References $key, $val, t3lib_div::imageMagickCommand(), and wrapFileName().

Referenced by getImageDimensions().

t3lib_stdGraphic::ImageTTFBBoxWrapper ( fontSize,
angle,
fontFile,
string,
splitRendering,
sF = 1 
)

Wrapper for ImageTTFBBox

Parameters:
integer (See argument for PHP function ImageTTFBBox())
integer (See argument for PHP function ImageTTFBBox())
string (See argument for PHP function ImageTTFBBox())
string (See argument for PHP function ImageTTFBBox())
array Split-rendering configuration
integer Scale factor
Returns:
array Information array.

Definition at line 962 of file class.t3lib_stdgraphic.php.

References debug(), t3lib_div::freetypeDpiComp(), prependAbsolutePath(), and splitString().

Referenced by calcBBox(), fontResize(), and SpacedImageTTFText().

t3lib_stdGraphic::ImageTTFTextWrapper ( im,
fontSize,
angle,
x,
y,
color,
fontFile,
string,
splitRendering,
sF = 1 
)

Wrapper for ImageTTFText

Parameters:
pointer (See argument for PHP function imageTTFtext())
integer (See argument for PHP function imageTTFtext())
integer (See argument for PHP function imageTTFtext())
integer (See argument for PHP function imageTTFtext())
integer (See argument for PHP function imageTTFtext())
integer (See argument for PHP function imageTTFtext())
string (See argument for PHP function imageTTFtext())
string (See argument for PHP function imageTTFtext()). UTF-8 string, possibly with entities in.
array Split-rendering configuration
integer Scale factor
Returns:
void

Definition at line 1009 of file class.t3lib_stdgraphic.php.

References convertColor(), debug(), t3lib_div::freetypeDpiComp(), prependAbsolutePath(), and splitString().

Referenced by makeText(), and SpacedImageTTFText().

t3lib_stdGraphic::ImageWrite ( destImg,
theImage,
quality = 0 
)

Writes the input GDlib image pointer to file

Parameters:
pointer The GDlib image resource pointer
string The filename to write to
integer The image quality (for JPEGs)
Returns:
mixed The output of either imageGif, imagePng or imageJpeg based on the filename to write
See also:
maskImageOntoImage(), scale(), output()

Definition at line 2753 of file class.t3lib_stdgraphic.php.

References imageGif().

Referenced by applyImageMagickToPHPGif(), makeShadow(), makeText(), maskImageOntoImage(), output(), and scale().

t3lib_stdGraphic::imgTag ( imgInfo  ) 

Returns Image Tag for input image information array.

Parameters:
array 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 2740 of file class.t3lib_stdgraphic.php.

t3lib_stdGraphic::IMparams ( setup  ) 

Creating ImageMagick paramters from TypoScript property

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

Definition at line 1510 of file class.t3lib_stdgraphic.php.

References $val, $value, t3lib_div::intExplode(), t3lib_div::intInRange(), v5_blur(), and v5_sharpen().

Referenced by makeEffect().

t3lib_stdGraphic::IMreduceColors ( file,
cols 
)

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

Parameters:
string Image file to reduce
integer Number of colors to reduce the image to.
Returns:
string Reduced file

Definition at line 1836 of file class.t3lib_stdgraphic.php.

References imageMagickExec(), t3lib_div::intInRange(), randomName(), and t3lib_div::split_fileref().

Referenced by output().

t3lib_stdGraphic::init (