t3lib_stdGraphic Klassenreferenz

Aufstellung aller Elemente

Öffentliche Methoden

 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)
 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)

Öffentliche Attribute

 $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 = ''

Geschützte Methoden

 wrapFileName ($inputName)

Dokumentation der Elementfunktionen

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

Parameter:
array Coordinates for a polygon image map as created by ->calcTextCordsForMap()
array Configuration for "imgMap." property of a TEXT GIFBUILDER object.
Rückgabe:
void private
Siehe auch:
makeText(), calcTextCordsForMap()
t3lib_stdGraphic::adjust ( &$  im,
conf 
)

Implements the "ADJUST" GIFBUILDER object

Parameter:
pointer GDlib image pointer
array TypoScript array with configuration for the GIFBUILDER object.
Rückgabe:
void
Siehe auch:
tslib_gifBuilder::make(), autoLevels(), outputLevels(), inputLevels()
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.

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

Parameter:
array Integer coordinates in key 0/1
array Offset values in key 0/1
Rückgabe:
array Modified $cords array
t3lib_stdGraphic::autolevels ( &$  im  ) 

Apply auto-levels to input image pointer

Parameter:
integer GDlib Image Pointer
Rückgabe:
void
t3lib_stdGraphic::cacheImageDimensions ( identifyResult  ) 

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

Parameter:
array $identifyResult: Result of the getImageDimensions function
Rückgabe:
boolean True if operation was successful
Autor:
Michael Stucki <michael@typo3.org> / Robert Lemke <rl@robertlemke.de>
t3lib_stdGraphic::calcBBox ( conf  ) 

Calculates bounding box information for the TEXT GIFBUILDER object.

Parameter:
array TypoScript array for the TEXT GIFBUILDER object
Rückgabe:
array Array with three keys [0]/[1] being x/y and [2] being the bounding box array private
Siehe auch:
txtPosition(), tslib_gifBuilder::start()
t3lib_stdGraphic::calcTextCordsForMap ( cords,
offset,
conf 
)

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

Parameter:
array Coordinates (from BBOX array)
array Offset array
array Configuration for "imgMap." property of a TEXT GIFBUILDER object.
Rückgabe:
array private
Siehe auch:
makeText(), calcTextCordsForMap()
t3lib_stdGraphic::calcWordSpacing ( conf,
scaleFactor = 1 
)

Calculates the spacing and wordSpacing values

Parameter:
array TypoScript array for the TEXT GIFBUILDER object
integer TypoScript value from eg $conf['niceText.']['scaleFactor']
Rückgabe:
array Array with two keys [0]/[1] being array($spacing,$wordSpacing) private
Siehe auch:
calcBBox()
t3lib_stdGraphic::checkFile ( file  ) 

Returns true if the input file existed

Parameter:
string Input file to check
Rückgabe:
string Returns the filename if the file existed, otherwise empty.
t3lib_stdGraphic::circleOffset ( distance,
iterations 
)

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

access private

Parameter:
integer Distance
integer Iterations.
Rückgabe:
array
Siehe auch:
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.

Parameter:
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: ...
Rückgabe:
void
t3lib_stdGraphic::convertColor ( string  ) 

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

Parameter:
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
Rückgabe:
array RGB values in key 0/1/2 of the array
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.

Parameter:
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
Rückgabe:
void Works on the $im image pointer private
t3lib_stdGraphic::copyImageOntoImage ( &$  im,
conf,
workArea 
)

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

Parameter:
pointer GDlib image pointer
array TypoScript array with configuration for the GIFBUILDER object.
array The current working area coordinates.
Rückgabe:
void
Siehe auch:
tslib_gifBuilder::make(), maskImageOntoImage()
t3lib_stdGraphic::createTempSubDir ( dirName  ) 

Creates subdirectory in typo3temp/ if not already found.

Parameter:
string Name of sub directory
Rückgabe:
boolean Result of t3lib_div::mkdir(), true if it went well.
t3lib_stdGraphic::crop ( &$  im,
conf 
)

Implements the "CROP" GIFBUILDER object

Parameter:
pointer GDlib image pointer
array TypoScript array with configuration for the GIFBUILDER object.
Rückgabe:
void
Siehe auch:
tslib_gifBuilder::make()
t3lib_stdGraphic::destroy (  ) 

Destroy internal image pointer, $this->im

Rückgabe:
void
Siehe auch:
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)

Parameter:
string Output imagefile
string Original basis file
Rückgabe:
boolean Returns true if the file is already being made; thus "true" means "Don't render the image again" private
t3lib_stdGraphic::fontResize ( conf  ) 

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

Parameter:
array The TypoScript properties of the TEXT GIFBUILDER object
Rückgabe:
integer The new fontSize private
Autor:
Rene Fritz <r.fritz@colorcube.de>
Siehe auch:
tslib_gifBuilder::start()
t3lib_stdGraphic::getCachedImageDimensions ( imageFile  ) 

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

Parameter:
string The image filepath
Rückgabe:
array Returns an array where [0]/[1] is w/h, [2] is extension and [3] is the filename.
Autor:
Michael Stucki <michael@typo3.org> / Robert Lemke <rl@robertlemke.de>
t3lib_stdGraphic::getImageDimensions ( imageFile  ) 

Gets the input image dimensions.

Parameter:
string The image filepath
Rückgabe:
array Returns an array where [0]/[1] is w/h, [2] is extension and [3] is the filename.
Siehe auch:
imageMagickConvert(), tslib_cObj::getImgResource()
t3lib_stdGraphic::getImageScale ( info,
w,
h,
options 
)

Get numbers for scaling the image based on input

Parameter:
array Current image information: Width, Height etc.
integer "required" width
integer "required" height
array Options: Keys are like "maxW", "maxH", "minW", "minH"
Rückgabe:
array private
Siehe auch:
imageMagickConvert()
t3lib_stdGraphic::getTextScalFactor ( conf  ) 

Calculates and returns the niceText.scaleFactor

Parameter:
array TypoScript array for the TEXT GIFBUILDER object
Rückgabe:
integer TypoScript value from eg $conf['niceText.']['scaleFactor'] private
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.

Parameter:
string The file extension, lowercase.
integer The width of the output image.
integer The height of the output image.
Rückgabe:
string The filename, either "jpg" or "gif"/"png" (whatever $this->gifExtension is set to.)
t3lib_stdGraphic::hexColor ( col  ) 

Returns the HEX color value for an RGB color array

Parameter:
array RGB color array
Rückgabe:
string HEX color value
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()"

Parameter:
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()"
Rückgabe:
void private
Siehe auch:
t3lib_iconWorks::imagecopyresized()
t3lib_stdGraphic::imagecreate ( w,
h 
)

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

Parameter:
integer Width of image
integer Height of image
Rückgabe:
pointer Image Resource pointer
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.

Parameter:
string Image filename
Rückgabe:
pointer Image Resource pointer
t3lib_stdGraphic::imageCreateFromGif ( sourceImg  ) 

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

Parameter:
string Image filename
Rückgabe:
pointer Image Resource pointer
Veraltet:
t3lib_stdGraphic::imageGif ( destImg,
theImage 
)

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

Parameter:
pointer The GDlib image resource pointer
string The filename to write to
Rückgabe:
mixed The output of either imageGif, imagePng or imageJpeg based on the filename to write
Siehe auch:
imageWrite()
Veraltet:
t3lib_stdGraphic::imageMagickConvert ( imagefile,
newExt = '',
w = '',
h = '',
params = '',
frame = '',
options = '',
mustCreate = 0 
)

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

Parameter:
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.
Rückgabe:
array [0]/[1] is w/h, [2] is file extension and [3] is the filename.
Siehe auch:
getImageScale(), typo3/show_item.php, fileList_ext::renderImage(), tslib_cObj::getImgResource(), SC_tslib_showpic::show(), maskImageOntoImage(), copyImageOntoImage(), 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.

Parameter:
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
Rückgabe:
string The result of a call to PHP function "exec()"
t3lib_stdGraphic::imageMagickIdentify ( imagefile  ) 

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

Parameter:
string The relative (to PATH_site) image filepath
Rückgabe:
array
t3lib_stdGraphic::ImageTTFBBoxWrapper ( fontSize,
angle,
fontFile,
string,
splitRendering,
sF = 1 
)

Wrapper for ImageTTFBBox

Parameter:
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
Rückgabe:
array Information array.
t3lib_stdGraphic::ImageTTFTextWrapper ( im,
fontSize,
angle,
x,
y,
color,
fontFile,
string,
splitRendering,
sF = 1 
)

Wrapper for ImageTTFText

Parameter:
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
Rückgabe:
void
t3lib_stdGraphic::ImageWrite ( destImg,
theImage,
quality = 0 
)

Writes the input GDlib image pointer to file

Parameter:
pointer The GDlib image resource pointer
string The filename to write to
integer The image quality (for JPEGs)
Rückgabe:
boolean The output of either imageGif, imagePng or imageJpeg based on the filename to write
Siehe auch:
maskImageOntoImage(), scale(), output()
t3lib_stdGraphic::imgTag ( imgInfo  ) 

Returns Image Tag for input image information array.

Parameter:
array Image information array, key 0/1 is width/height and key 3 is the src value
Rückgabe:
string Image tag for the input image information array.
t3lib_stdGraphic::IMparams ( setup  ) 

Creating ImageMagick paramters from TypoScript property

Parameter:
string A string with effect keywords=value pairs separated by "|"
Rückgabe:
string ImageMagick prepared parameters. private
Siehe auch:
makeEffect()
t3lib_stdGraphic::IMreduceColors ( file,
cols 
)

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

Parameter:
string Image file to reduce
integer Number of colors to reduce the image to.
Rückgabe:
string Reduced file
t3lib_stdGraphic::init (  ) 

Init function. Must always call this when using the class. This function will read the configuration information from $GLOBALS['TYPO3_CONF_VARS']['GFX'] can set some values in internal variables.

Rückgabe:
void
t3lib_stdGraphic::inputLevels ( &$  im,
low,
high,
swap = '' 
)

Apply input levels to input image pointer (increasing contrast)

Parameter:
integer GDlib Image Pointer
integer The "low" value (close to 0)
integer The "high" value (close to 255)
boolean If swap, then low and high are swapped. (Useful for negated masks...)
Rückgabe:
void
t3lib_stdGraphic::makeBox ( &$  im,
conf,
workArea 
)

Implements the "BOX" GIFBUILDER object

Parameter:
pointer GDlib image pointer
array TypoScript array with configuration for the GIFBUILDER object.
array The current working area coordinates.
Rückgabe:
void
Siehe auch:
tslib_gifBuilder::make()
t3lib_stdGraphic::makeEffect ( &$  im,
conf 
)

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

Parameter:
pointer GDlib image pointer
array TypoScript array with configuration for the GIFBUILDER object.
Rückgabe:
void
Siehe auch:
tslib_gifBuilder::make(), applyImageMagickToPHPGif()
t3lib_stdGraphic::makeEmboss ( &$  im,
conf,
workArea,
txtConf 
)

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

Parameter:
pointer GDlib image pointer
array TypoScript array with configuration for the GIFBUILDER object.
array The current working area coordinates.
array TypoScript array with configuration for the associated TEXT GIFBUILDER object.
Rückgabe:
void
Siehe auch:
tslib_gifBuilder::make(), makeShadow()
t3lib_stdGraphic::makeOutline ( &$  im,
conf,
workArea,
txtConf 
)

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

Parameter:
pointer GDlib image pointer
array TypoScript array with configuration for the GIFBUILDER object.
array The current working area coordinates.
array TypoScript array with configuration for the associated TEXT GIFBUILDER object.
Rückgabe:
void
Siehe auch:
tslib_gifBuilder::make(), makeText()
t3lib_stdGraphic::makeShadow ( &$  im,
conf,
workArea,
txtConf 
)

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

Parameter:
pointer GDlib image pointer
array TypoScript array with configuration for the GIFBUILDER object.
array The current working area coordinates.
array TypoScript array with configuration for the associated TEXT GIFBUILDER object.
Rückgabe:
void
Siehe auch:
tslib_gifBuilder::make(), makeText(), makeEmboss()
t3lib_stdGraphic::makeText ( &$  im,
conf,
workArea 
)

Implements the "TEXT" GIFBUILDER object

Parameter:
pointer GDlib image pointer
array TypoScript array with configuration for the GIFBUILDER object.
array The current working area coordinates.
Rückgabe:
void
Siehe auch:
tslib_gifBuilder::make()
t3lib_stdGraphic::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.

Parameter:
pointer GDlib image pointer
array TypoScript array with configuration for the GIFBUILDER object.
array The current working area coordinates.
Rückgabe:
void
Siehe auch:
tslib_gifBuilder::make()
t3lib_stdGraphic::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

Parameter:
array TypoScript configuration for a GIFBUILDER object
array Workarea definition
array BB (Bounding box) array. Not just used for TEXT objects but also for others
Rückgabe:
array [0]=x, [1]=y, [2]=w, [3]=h private
Siehe auch:
copyGifOntoGif(), makeBox(), crop()
t3lib_stdGraphic::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.

Parameter:
string The filename to write to.
Rückgabe:
string Returns input filename
Siehe auch:
tslib_gifBuilder::gifBuild()
t3lib_stdGraphic::outputLevels ( &$  im,
low,
high,
swap = '' 
)

Apply output levels to input image pointer (decreasing contrast)

Parameter:
integer GDlib Image Pointer
integer The "low" value (close to 0)
integer The "high" value (close to 255)
boolean If swap, then low and high are swapped. (Useful for negated masks...)
Rückgabe:
void
t3lib_stdGraphic::prependAbsolutePath ( fontFile  ) 

Checks if the $fontFile is already at an absolute path and if not, prepends the correct path. Use PATH_site unless we are in the backend. Call it by t3lib_stdGraphic::prependAbsolutePath()

Parameter:
string The font file
Rückgabe:
string The font file with absolute path.
t3lib_stdGraphic::randomName (  ) 

Returns a random filename prefixed with "temp_" and then 32 char md5 hash (without extension) from $this->tempPath. Used by functions in this class to create truely temporary files for the on-the-fly processing. These files will most likely be deleted right away.

Rückgabe:
string
t3lib_stdGraphic::recodeString ( string  ) 

Recode string Used with text strings for fonts when languages has other character sets.

Parameter:
string The text to recode
Rückgabe:
string The recoded string. Should be UTF-8 output. MAY contain entities (eg. &#123; or &quot; which should render as real chars).
t3lib_stdGraphic::reduceColors ( &$  im,
limit,
cols 
)

Reduce colors in image dependend on the actual amount of colors (Only works if we are not in truecolor mode)

Parameter:
integer GDlib Image Pointer
integer The max number of colors in the image before a reduction will happen; basically this means that IF the GD image current has the same amount or more colors than $limit define, THEN a reduction is performed.
integer Number of colors to reduce the image to.
Rückgabe:
void
t3lib_stdGraphic::scale ( &$  im,
conf 
)

Implements the "SCALE" GIFBUILDER object

Parameter:
pointer GDlib image pointer
array TypoScript array with configuration for the GIFBUILDER object.
Rückgabe:
void
Siehe auch:
tslib_gifBuilder::make()
t3lib_stdGraphic::setWorkArea ( workArea  ) 

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

Parameter:
string Working area dimensions, comma separated
Rückgabe:
void private
Siehe auch:
tslib_gifBuilder::make()
t3lib_stdGraphic::singleChars ( theText,
returnUnicodeNumber = FALSE 
)

Split a string into an array of individual characters The function will look at $this->nativeCharset and if that is set, the input string is expected to be UTF-8 encoded, possibly with entities in it. Otherwise the string is supposed to be a single-byte charset which is just splitted by a for-loop.

Parameter:
string The text string to split
boolean Return Unicode numbers instead of chars.
Rückgabe:
array Numerical array with a char as each value.
t3lib_stdGraphic::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

Parameter:
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.
integer The spacing of letters in pixels
integer The spacing of words in pixels
array $splitRenderingConf array
integer Scale factor
Rückgabe:
void private
t3lib_stdGraphic::splitString ( string,
splitRendering,
fontSize,
fontFile 
)

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

Parameter:
string UTF-8 string
array Split-rendering configuration from GIFBUILDER TEXT object.
integer Current fontsize
string Current font file
Rückgabe:
array Array with input string splitted according to configuration
t3lib_stdGraphic::txtPosition ( conf,
workArea,
BB 
)

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

Parameter:
array TypoScript array for the TEXT GIFBUILDER object
array Workarea definition
array Bounding box information, was set in tslib_gifBuilder::start()
Rückgabe:
array [0]=x, [1]=y, [2]=w, [3]=h private
Siehe auch:
makeText()
t3lib_stdGraphic::unifyColors ( &$  img,
colArr,
closest = false 
)

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

Parameter:
pointer Image resource
array Array containing RGB color arrays
[type] $closest: ...
Rückgabe:
integer The index of the unified color
t3lib_stdGraphic::v5_blur ( factor  ) 

Returns the IM command for blurring with ImageMagick 5 (when $this->V5_EFFECTS is set). Uses $this->im5fx_blurSteps for translation of the factor to an actual command.

Parameter:
integer The blurring factor, 0-100 (effectively in 10 steps)
Rückgabe:
string The blurring command, eg. " -blur 3x4"
Siehe auch:
makeText(), IMparams(), v5_sharpen()
t3lib_stdGraphic::v5_sharpen ( factor  ) 

Returns the IM command for sharpening with ImageMagick 5 (when $this->V5_EFFECTS is set). Uses $this->im5fx_sharpenSteps for translation of the factor to an actual command.

Parameter:
integer The sharpening factor, 0-100 (effectively in 10 steps)
Rückgabe:
string The sharpening command, eg. " -sharpen 3x4"
Siehe auch:
makeText(), IMparams(), v5_blur()
t3lib_stdGraphic::wrapFileName ( inputName  )  [protected]

Escapes a file name so it can safely be used on the command line.

Parameter:
string $inputName filename to safeguard, must not be empty
Rückgabe:
string $inputName escaped as needed

Dokumentation der Datenelemente

t3lib_stdGraphic::$cmds
Initialisierung:
 Array (
                'jpg' => '',
                'jpeg' => '',
                'gif' => '-colors 64',
                'png' => '-colors 64'
        )
t3lib_stdGraphic::$colMap
Initialisierung:
 Array (                                                                
                'aqua' => Array(0,255,255),
                'black' => Array(0,0,0),
                'blue' => Array(0,0,255),
                'fuchsia' => Array(255,0,255),
                'gray' => Array(128,128,128),
                'green' => Array(0,128,0),
                'lime' => Array(0,255,0),
                'maroon' => Array(128,0,0),
                'navy' => Array(0,0,128),
                'olive' => Array(128,128,0),
                'purple' => Array(128,0,128),
                'red' => Array(255,0,0),
                'silver' => Array(192,192,192),
                'teal' => Array(0,128,128),
                'yellow' => Array(255,255,0),
                'white' => Array(255,255,255)
        )

Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei:
 Alle Klassen Namensbereiche Funktionen Variablen

Erzeugt am Wed Oct 28 16:40:23 2009 für Typo3 von  doxygen 1.6.1