TCPDF_IMAGES
in package
Tags
Table of Contents
Properties
- $svginheritprop : array<string|int, string>
- Array of hinheritable SVG properties.
Methods
- _parsejpeg() : array<string|int, mixed>|false
- Extract info from a JPEG file without using the GD library.
- _parsepng() : array<string|int, mixed>|false
- Extract info from a PNG file without using the GD library.
- _toJPEG() : mixed
- Convert the loaded image to a JPEG and then return a structure for the PDF creator.
- _toPNG() : mixed
- Convert the loaded image to a PNG and then return a structure for the PDF creator.
- getImageFileType() : string
- Return the image type given the file name or array returned by getimagesize() function.
- setGDImageTransparency() : resource
- Set the transparency for the given GD image.
Properties
$svginheritprop
Array of hinheritable SVG properties.
public static array<string|int,
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')
Tags
Methods
_parsejpeg()
Extract info from a JPEG file without using the GD library.
public static _parsejpeg(string $file)
: array<string|int,
mixed>|false
Parameters
- $file : string
-
image file to parse
Tags
Return values
array<string|int, mixed>|false —structure containing the image data
_parsepng()
Extract info from a PNG file without using the GD library.
public static _parsepng(string $file)
: array<string|int,
mixed>|false
Parameters
- $file : string
-
image file to parse
Tags
Return values
array<string|int, mixed>|false —structure containing the image data
_toJPEG()
Convert the loaded image to a JPEG and then return a structure for the PDF creator.
public static _toJPEG(resource $image,
int $quality,
string $tempfile)
: mixed
This function requires GD library and write access to the directory defined on K_PATH_CACHE constant.
Parameters
- $image : resource
-
Image object.
- $quality : int
-
JPEG quality.
- $tempfile : string
-
Temporary file name. return array|false image JPEG image object.
Tags
_toPNG()
Convert the loaded image to a PNG and then return a structure for the PDF creator.
public static _toPNG(resource $image,
string $tempfile)
: mixed
This function requires GD library and write access to the directory defined on K_PATH_CACHE constant.
Parameters
- $image : resource
-
Image object.
- $tempfile : string
-
Temporary file name. return image PNG image object.
Tags
getImageFileType()
Return the image type given the file name or array returned by getimagesize() function.
public static getImageFileType(string $imgfile[,
array<string|int,
mixed> $iminfo
= array()
]) : string
Parameters
- $imgfile : string
-
image file name
- $iminfo : array<string|int, mixed> = array()
-
array of image information returned by getimagesize() function.
Tags
Return values
string —image type
setGDImageTransparency()
Set the transparency for the given GD image.
public static setGDImageTransparency(resource $new_image,
resource $image)
: resource
Parameters
- $new_image : resource
-
GD image object
- $image : resource
-
GD image object.
Tags
Return values
resource —GD image object $new_image