class TCPDF_IMAGES (View source)

Properties

static string[] Since: 5.0.000 (2010-05-02)
$svginheritprop

Array of hinheritable SVG properties.

Methods

static string
getImageFileType(string $imgfile, array $iminfo = array())

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

static resource
setGDImageTransparency(resource $new_image, resource $image)

Set the transparency for the given GD image.

static 
_toPNG(resource $image, string $tempfile)

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

static 
_toJPEG(resource $image, int $quality, string $tempfile)

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

static array|false
_parsejpeg(string $file)

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

static array|false
_parsepng(string $file)

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

Details

static string getImageFileType(string $imgfile, array $iminfo = array())

Since: 4.8.017 (2009-11-27)

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

Parameters

string $imgfile

image file name

array $iminfo

array of image information returned by getimagesize() function.

Return Value

string

image type

static resource setGDImageTransparency(resource $new_image, resource $image)

Since: 4.9.016 (2010-04-20)

Set the transparency for the given GD image.

Parameters

resource $new_image

GD image object

resource $image

GD image object.

Return Value

resource

GD image object $new_image

static _toPNG(resource $image, string $tempfile)

Since: 4.9.016 (2010-04-20)

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 $image

Image object.

string $tempfile

Temporary file name. return image PNG image object.

static _toJPEG(resource $image, int $quality, string $tempfile)

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 $image

Image object.

int $quality

JPEG quality.

string $tempfile

Temporary file name. return array|false image JPEG image object.

static array|false _parsejpeg(string $file)

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

Parameters

string $file

image file to parse

Return Value

array|false

structure containing the image data

static array|false _parsepng(string $file)

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

Parameters

string $file

image file to parse

Return Value

array|false

structure containing the image data