Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
TCPDF_IMAGES Class Reference

Static image methods used by the TCPDF class. More...

Static Public Member Functions

static _parsejpeg ($file)
 Extract info from a JPEG file without using the GD library.
 
static _parsepng ($file)
 Extract info from a PNG file without using the GD library.
 
static _toJPEG ($image, $quality, $tempfile)
 Convert the loaded image to a JPEG and then return a structure for the PDF creator.
 
static _toPNG ($image, $tempfile)
 Convert the loaded image to a PNG and then return a structure for the PDF creator.
 
static getImageFileType ($imgfile, $iminfo=array())
 Return the image type given the file name or array returned by getimagesize() function.
 
static setGDImageTransparency ($new_image, $image)
 Set the transparency for the given GD image.
 

Static Public Attributes

static string[] $svginheritprop = array('clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cursor', 'direction', 'display', 'fill', 'fill-opacity', 'fill-rule', 'font', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'image-rendering', 'kerning', 'letter-spacing', 'marker', 'marker-end', 'marker-mid', 'marker-start', 'pointer-events', 'shape-rendering', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-rendering', 'visibility', 'word-spacing', 'writing-mode')
 Array of hinheritable SVG properties.
 

Detailed Description

Static image methods used by the TCPDF class.

..

PHP class for generating PDF documents without requiring external extensions.

Version
1.0.005
Author
Nicola Asuni - info@.nosp@m.tecn.nosp@m.ick.c.nosp@m.om

Member Function Documentation

◆ _parsejpeg()

static TCPDF_IMAGES::_parsejpeg ( $file)
static

Extract info from a JPEG file without using the GD library.

Parameters
string$fileimage file to parse
Return values
array|falsestructure containing the image data static

◆ _parsepng()

static TCPDF_IMAGES::_parsepng ( $file)
static

Extract info from a PNG file without using the GD library.

Parameters
string$fileimage file to parse
Return values
array|falsestructure containing the image data static

◆ _toJPEG()

static TCPDF_IMAGES::_toJPEG ( $image,
$quality,
$tempfile )
static

Convert the loaded image to a JPEG and then return a structure for the PDF creator.

This function requires GD library and write access to the directory defined on K_PATH_CACHE constant.

Parameters
resource$imageImage object.
int$qualityJPEG quality.
string$tempfileTemporary file name. return array|false image JPEG image object. static

◆ _toPNG()

static TCPDF_IMAGES::_toPNG ( $image,
$tempfile )
static

Convert the loaded image to a PNG and then return a structure for the PDF creator.

This function requires GD library and write access to the directory defined on K_PATH_CACHE constant.

Parameters
resource$imageImage object.
string$tempfileTemporary file name. return image PNG image object.
Since
4.9.016 (2010-04-20) static

◆ getImageFileType()

static TCPDF_IMAGES::getImageFileType ( $imgfile,
$iminfo = array() )
static

Return the image type given the file name or array returned by getimagesize() function.

Parameters
string$imgfileimage file name
array$iminfoarray of image information returned by getimagesize() function.
Return values
stringimage type
Since
4.8.017 (2009-11-27) static

◆ setGDImageTransparency()

static TCPDF_IMAGES::setGDImageTransparency ( $new_image,
$image )
static

Set the transparency for the given GD image.

Parameters
resource$new_imageGD image object
resource$imageGD image object.
Return values
resourceGD image object $new_image
Since
4.9.016 (2010-04-20) static

Member Data Documentation

◆ $svginheritprop

string [] TCPDF_IMAGES::$svginheritprop = array('clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cursor', 'direction', 'display', 'fill', 'fill-opacity', 'fill-rule', 'font', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'image-rendering', 'kerning', 'letter-spacing', 'marker', 'marker-end', 'marker-mid', 'marker-start', 'pointer-events', 'shape-rendering', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-rendering', 'visibility', 'word-spacing', 'writing-mode')
static

Array of hinheritable SVG properties.

Since
5.0.000 (2010-05-02) static

The documentation for this class was generated from the following file: