Documentation

TCPDF_IMAGES
in package

Tags
class

TCPDF_IMAGES Static image methods used by the TCPDF class.

brief

PHP class for generating PDF documents without requiring external extensions.

version
1.0.005
author

Nicola Asuni - info@tecnick.com

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
since
5.0.000

(2010-05-02)

public

static

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
public

static

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
public

static

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
public

static

_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
since
4.9.016

(2010-04-20)

public

static

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
since
4.8.017

(2009-11-27)

public

static

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
since
4.9.016

(2010-04-20)

public

static

Return values
resource

GD image object $new_image


        
On this page

Search results