Documentation

Image
in package

FinalYes

Legacy image conversion, resizing, thumbnail, and optimization facade.

Included for historical compatibility only. This API is out of support and should not be used in new code.

Tags
author

Daniel Schulz

since
2017-12-28

Table of Contents

Constants

FFMPEG_ACTIVE  : mixed = true
FFMPEG_PATH  : mixed = 'ffmpeg'
FFMPEG_QUERY_CONVERT  : mixed = '-i %1$s %2$s -y'
IRFANVIEW_ACTIVE  : mixed = true
IRFANVIEW_PATH  : mixed = 'i_view32'
IRFANVIEW_QUERY_CONVERT  : mixed = '%1$s /silent /convert=%2$s'
IRFANVIEW_QUERY_SCALE  : mixed = '%1$s /silent /resize=(%3$d,%4$d) /convert=%2$s'
IRFANVIEW_QUERY_SIZE  : mixed = '%1$s /resize=(%3$d,%4$d) /aspectratio /silent...
OPTIPNG_ACTIVE  : mixed = true
OPTIPNG_PATH  : mixed = 'optipng'
OPTIPNG_QUERY_MINIFY  : mixed = '-silent %1$s'
THUMBNAIL_HEIGHT  : mixed = 240
THUMBNAIL_WIDTH  : mixed = 320

Methods

addSprite()  : bool
convertFile()  : bool
createFromFile()  : mixed
createSprite()  : bool
cropFile()  : void
generateThumbnail()  : mixed
imageInfo()  : array<string|int, mixed>
mergeFile()  : bool
scaleFile()  : bool
setTransparency()  : void
splitImage()  : mixed
getTempFile()  : string

Constants

FFMPEG_ACTIVE

public mixed FFMPEG_ACTIVE = true

FFMPEG_PATH

public mixed FFMPEG_PATH = 'ffmpeg'

FFMPEG_QUERY_CONVERT

public mixed FFMPEG_QUERY_CONVERT = '-i %1$s %2$s -y'

IRFANVIEW_ACTIVE

public mixed IRFANVIEW_ACTIVE = true

IRFANVIEW_PATH

public mixed IRFANVIEW_PATH = 'i_view32'

IRFANVIEW_QUERY_CONVERT

public mixed IRFANVIEW_QUERY_CONVERT = '%1$s /silent /convert=%2$s'

IRFANVIEW_QUERY_SCALE

public mixed IRFANVIEW_QUERY_SCALE = '%1$s /silent /resize=(%3$d,%4$d) /convert=%2$s'

IRFANVIEW_QUERY_SIZE

public mixed IRFANVIEW_QUERY_SIZE = '%1$s /resize=(%3$d,%4$d) /aspectratio /silent /convert=%2$s'

OPTIPNG_ACTIVE

public mixed OPTIPNG_ACTIVE = true

OPTIPNG_PATH

public mixed OPTIPNG_PATH = 'optipng'

OPTIPNG_QUERY_MINIFY

public mixed OPTIPNG_QUERY_MINIFY = '-silent %1$s'

THUMBNAIL_HEIGHT

public mixed THUMBNAIL_HEIGHT = 240

THUMBNAIL_WIDTH

public mixed THUMBNAIL_WIDTH = 320

Methods

addSprite()

public static addSprite(mixed $destFile, array<string|int, mixed> $sourceFileList[, mixed $spriteWidth = null ][, mixed $spriteHeigh = null ]) : bool
Parameters
$destFile : mixed
$sourceFileList : array<string|int, mixed>
$spriteWidth : mixed = null
$spriteHeigh : mixed = null
Return values
bool

convertFile()

public static convertFile(mixed $sourceFile, mixed $destFile) : bool
Parameters
$sourceFile : mixed
$destFile : mixed
Return values
bool

createFromFile()

public static createFromFile(mixed $file) : mixed
Parameters
$file : mixed
Tags
throws
DomainException

createSprite()

public static createSprite(mixed $destFile, mixed $spriteWidth, mixed $spriteHeight[, mixed $cols = 1 ][, mixed $rows = 1 ][, array<string|int, mixed> $imageList = [] ]) : bool
Parameters
$destFile : mixed
$spriteWidth : mixed
$spriteHeight : mixed
$cols : mixed = 1
$rows : mixed = 1
$imageList : array<string|int, mixed> = []
Return values
bool

cropFile()

public static cropFile(mixed $sourceFile, mixed $destFile, mixed $width, mixed $height) : void
Parameters
$sourceFile : mixed
$destFile : mixed
$width : mixed
$height : mixed

generateThumbnail()

public static generateThumbnail(mixed $sourceFile[, mixed $thumbWidth = null ][, mixed $thumbHeight = null ][, mixed $returnLink = true ]) : mixed
Parameters
$sourceFile : mixed
$thumbWidth : mixed = null
$thumbHeight : mixed = null
$returnLink : mixed = true
Tags
throws
Exception

imageInfo()

public static imageInfo(mixed $file) : array<string|int, mixed>
Parameters
$file : mixed
Return values
array<string|int, mixed>

mergeFile()

public static mergeFile(mixed $sourceFile, mixed $appendFile[, mixed $targetFile = null ]) : bool
Parameters
$sourceFile : mixed
$appendFile : mixed
$targetFile : mixed = null
Return values
bool

scaleFile()

public static scaleFile(mixed $sourceFile, mixed $destFile, mixed $width, mixed $height) : bool
Parameters
$sourceFile : mixed
$destFile : mixed
$width : mixed
$height : mixed
Return values
bool

setTransparency()

public static setTransparency(mixed $image_source, mixed $new_image) : void
Parameters
$image_source : mixed
$new_image : mixed

splitImage()

public static splitImage(mixed $file, mixed $x, mixed $y, mixed $new_width, mixed $new_height) : mixed
Parameters
$file : mixed
$x : mixed
$y : mixed
$new_width : mixed
$new_height : mixed

getTempFile()

protected static getTempFile() : string
Return values
string
On this page

Search results