class Image

Basic manipulation with images. Supported types are JPEG, PNG, GIF, WEBP and BMP.

$image = Image::fromFile('nette.jpg');
$image->resize(150, 100);
$image->sharpen();
$image->send();

Constants

deprecated SHRINK_ONLY

STRETCH

resize() will ignore aspect ratio

FIT

resize() fits in given area so its dimensions are less than or equal to the required dimensions

FILL

resize() fills given area so its dimensions are greater than or equal to the required dimensions

EXACT

resize() fills given area exactly

JPEG

image types

PNG

image types

GIF

image types

WEBP

image types

BMP

image types

EMPTY_GIF

private FORMATS

Properties

int read-only $width
int read-only $height
GdImage read-only $imageResource

Methods

static array
rgb(int $red, int $green, int $blue, int $transparency = 0)

Returns RGB color (0..255) and transparency (0..127).

static Image
fromFile(string $file, int|null $type = null)

Reads an image from a file and returns its type in $type.

static Image
fromString(string $s, int|null $type = null)

Reads an image from a string and returns its type in $type.

static Image
fromBlank(int $width, int $height, array|null $color = null)

Creates a new true color image of the given dimensions. The default color is black.

static int|null
detectTypeFromFile(string $file)

Returns the type of image from file.

static int|null
detectTypeFromString(string $s)

Returns the type of image from string.

static string
typeToExtension(int $type)

Returns the file extension for the given Image::XXX constant.

static string
typeToMimeType(int $type)

Returns the mime type for the given Image::XXX constant.

__construct(GdImage $image)

Wraps GD image.

int
getWidth()

Returns image width.

int
getHeight()

Returns image height.

setImageResource(GdImage $image)

Sets image resource.

GdImage
getImageResource()

Returns image GD resource.

resize(int|string|null $width, int|string|null $height, int $mode = self::FIT, bool $shrinkOnly = false)

Scales an image. Width and height accept pixels or percent.

static array
calculateSize(int $srcWidth, int $srcHeight, $newWidth, $newHeight, int $mode = self::FIT, bool $shrinkOnly = false)

Calculates dimensions of resized image. Width and height accept pixels or percent.

crop(int|string $left, int|string $top, int|string $width, int|string $height)

Crops image. Arguments accepts pixels or percent.

static array
calculateCutout(int $srcWidth, int $srcHeight, int|string $left, int|string $top, int|string $newWidth, int|string $newHeight)

Calculates dimensions of cutout in image. Arguments accepts pixels or percent.

sharpen()

Sharpens image a little bit.

place(Image $image, int|string $left = 0, int|string $top = 0, int $opacity = 100)

Puts another image into this image. Left and top accepts pixels or percent.

void
save(string $file, int|null $quality = null, int|null $type = null)

Saves image to the file. Quality is in the range 0..100 for JPEG (default 85) and WEBP (default 80) and 0..9 for PNG (default 9).

string
toString(int $type = self::JPEG, int|null $quality = null)

Outputs image to string. Quality is in the range 0..100 for JPEG (default 85) and WEBP (default 80) and 0..9 for PNG (default 9).

string
__toString()

Outputs image to string.

void
send(int $type = self::JPEG, int|null $quality = null)

Outputs image to browser. Quality is in the range 0..100 for JPEG (default 85) and WEBP (default 80) and 0..9 for PNG (default 9).

mixed
__call(string $name, array $args)

Call to undefined method.

__clone()

No description

array
__sleep()

Prevents serialization.

affine(array $affine, array $clip = null)

No description

array
affineMatrixConcat(array $m1, array $m2)

No description

array
affineMatrixGet(int $type, mixed $options = null)

No description

void
alphaBlending(bool $on)

No description

void
antialias(bool $on)

No description

void
arc(mixed $x, mixed $y, mixed $w, mixed $h, mixed $start, mixed $end, mixed $color)

No description

void
char(int $font, mixed $x, mixed $y, string $char, mixed $color)

No description

void
charUp(int $font, mixed $x, mixed $y, string $char, mixed $color)

No description

int
colorAllocate(mixed $red, mixed $green, mixed $blue)

No description

int
colorAllocateAlpha(mixed $red, mixed $green, mixed $blue, mixed $alpha)

No description

int
colorAt(mixed $x, mixed $y)

No description

int
colorClosest(mixed $red, mixed $green, mixed $blue)

No description

int
colorClosestAlpha(mixed $red, mixed $green, mixed $blue, mixed $alpha)

No description

int
colorClosestHWB(mixed $red, mixed $green, mixed $blue)

No description

void
colorDeallocate(mixed $color)

No description

int
colorExact(mixed $red, mixed $green, mixed $blue)

No description

int
colorExactAlpha(mixed $red, mixed $green, mixed $blue, mixed $alpha)

No description

void
colorMatch(Image $image2)

No description

int
colorResolve(mixed $red, mixed $green, mixed $blue)

No description

int
colorResolveAlpha(mixed $red, mixed $green, mixed $blue, mixed $alpha)

No description

void
colorSet(mixed $index, mixed $red, mixed $green, mixed $blue)

No description

array
colorsForIndex(mixed $index)

No description

int
colorsTotal()

No description

int
colorTransparent(mixed $color)

No description

void
convolution(array $matrix, float $div, float $offset)

No description

void
copy(Image $src, mixed $dstX, mixed $dstY, mixed $srcX, mixed $srcY, mixed $srcW, mixed $srcH)

No description

void
copyMerge(Image $src, mixed $dstX, mixed $dstY, mixed $srcX, mixed $srcY, mixed $srcW, mixed $srcH, mixed $opacity)

No description

void
copyMergeGray(Image $src, mixed $dstX, mixed $dstY, mixed $srcX, mixed $srcY, mixed $srcW, mixed $srcH, mixed $opacity)

No description

void
copyResampled(Image $src, mixed $dstX, mixed $dstY, mixed $srcX, mixed $srcY, mixed $dstW, mixed $dstH, mixed $srcW, mixed $srcH)

No description

void
copyResized(Image $src, mixed $dstX, mixed $dstY, mixed $srcX, mixed $srcY, mixed $dstW, mixed $dstH, mixed $srcW, mixed $srcH)

No description

cropAuto(int $mode = -1, float $threshold = .5, int $color = -1)

No description

void
ellipse(mixed $cx, mixed $cy, mixed $w, mixed $h, mixed $color)

No description

void
fill(mixed $x, mixed $y, mixed $color)

No description

void
filledArc(mixed $cx, mixed $cy, mixed $w, mixed $h, mixed $s, mixed $e, mixed $color, mixed $style)

No description

void
filledEllipse(mixed $cx, mixed $cy, mixed $w, mixed $h, mixed $color)

No description

void
filledPolygon(array $points, mixed $numPoints, mixed $color)

No description

void
filledRectangle(mixed $x1, mixed $y1, mixed $x2, mixed $y2, mixed $color)

No description

void
fillToBorder(mixed $x, mixed $y, mixed $border, mixed $color)

No description

void
filter(mixed $filtertype)

No description

void
flip(int $mode)

No description

array
ftText(mixed $size, mixed $angle, mixed $x, mixed $y, mixed $col, string $fontFile, string $text, array $extrainfo = null)

No description

void
gammaCorrect(float $inputgamma, float $outputgamma)

No description

array
getClip()

No description

int
interlace(mixed $interlace)

No description

bool
isTrueColor()

No description

void
layerEffect(mixed $effect)

No description

void
line(mixed $x1, mixed $y1, mixed $x2, mixed $y2, mixed $color)

No description

void
openPolygon(array $points, int $num_points, int $color)

No description

void
paletteCopy(Image $source)

No description

void
paletteToTrueColor()

No description

void
polygon(array $points, mixed $numPoints, mixed $color)

No description

array
psText(string $text, mixed $font, mixed $size, mixed $color, mixed $backgroundColor, mixed $x, mixed $y, mixed $space, mixed $tightness, float $angle = null, mixed $antialiasSteps)

No description

void
rectangle(mixed $x1, mixed $y1, mixed $x2, mixed $y2, mixed $col)

No description

mixed
resolution(int $res_x = null, int $res_y = null)

No description

rotate(float $angle, mixed $backgroundColor)

No description

void
saveAlpha(bool $saveflag)

No description

scale(int $newWidth, int $newHeight = -1, int $mode = IMG_BILINEAR_FIXED)

No description

void
setBrush(Image $brush)

No description

void
setClip(int $x1, int $y1, int $x2, int $y2)

No description

void
setInterpolation(int $method = IMG_BILINEAR_FIXED)

No description

void
setPixel(mixed $x, mixed $y, mixed $color)

No description

void
setStyle(array $style)

No description

void
setThickness(mixed $thickness)

No description

void
setTile(Image $tile)

No description

void
string(mixed $font, mixed $x, mixed $y, string $s, mixed $col)

No description

void
stringUp(mixed $font, mixed $x, mixed $y, string $s, mixed $col)

No description

void
trueColorToPalette(bool $dither, mixed $ncolors)

No description

array
ttfText(mixed $size, mixed $angle, mixed $x, mixed $y, mixed $color, string $fontfile, string $text)

No description

Details

at line 134
static array rgb(int $red, int $green, int $blue, int $transparency = 0)

Returns RGB color (0..255) and transparency (0..127).

Parameters

int $red
int $green
int $blue
int $transparency

Return Value

array

at line 150
static Image fromFile(string $file, int|null $type = null)

Reads an image from a file and returns its type in $type.

Parameters

string $file
int|null $type

Return Value

Image

Exceptions

NotSupportedException
UnknownImageFileException

at line 170
static Image fromString(string $s, int|null $type = null)

Reads an image from a string and returns its type in $type.

Parameters

string $s
int|null $type

Return Value

Image

Exceptions

NotSupportedException
ImageException

at line 206
static Image fromBlank(int $width, int $height, array|null $color = null)

Creates a new true color image of the given dimensions. The default color is black.

Parameters

int $width
int $height
array|null $color

Return Value

Image

Exceptions

NotSupportedException

at line 232
static int|null detectTypeFromFile(string $file)

Returns the type of image from file.

Parameters

string $file

Return Value

int|null

at line 242
static int|null detectTypeFromString(string $s)

Returns the type of image from string.

Parameters

string $s

Return Value

int|null

at line 252
static string typeToExtension(int $type)

Returns the file extension for the given Image::XXX constant.

Parameters

int $type

Return Value

string

at line 265
static string typeToMimeType(int $type)

Returns the mime type for the given Image::XXX constant.

Parameters

int $type

Return Value

string

at line 274
__construct(GdImage $image)

Wraps GD image.

Parameters

GdImage $image

at line 284
int getWidth()

Returns image width.

Return Value

int

at line 293
int getHeight()

Returns image height.

Return Value

int

at line 302
protected Image setImageResource(GdImage $image)

Sets image resource.

Parameters

GdImage $image

Return Value

Image

at line 312
GdImage getImageResource()

Returns image GD resource.

Return Value

GdImage

at line 322
Image resize(int|string|null $width, int|string|null $height, int $mode = self::FIT, bool $shrinkOnly = false)

Scales an image. Width and height accept pixels or percent.

Parameters

int|string|null $width
int|string|null $height
int $mode
bool $shrinkOnly

Return Value

Image

at line 363
static array calculateSize(int $srcWidth, int $srcHeight, $newWidth, $newHeight, int $mode = self::FIT, bool $shrinkOnly = false)

Calculates dimensions of resized image. Width and height accept pixels or percent.

Parameters

int $srcWidth
int $srcHeight
$newWidth
$newHeight
int $mode
bool $shrinkOnly

Return Value

array

at line 431
Image crop(int|string $left, int|string $top, int|string $width, int|string $height)

Crops image. Arguments accepts pixels or percent.

Parameters

int|string $left
int|string $top
int|string $width
int|string $height

Return Value

Image

at line 451
static array calculateCutout(int $srcWidth, int $srcHeight, int|string $left, int|string $top, int|string $newWidth, int|string $newHeight)

Calculates dimensions of cutout in image. Arguments accepts pixels or percent.

Parameters

int $srcWidth
int $srcHeight
int|string $left
int|string $top
int|string $newWidth
int|string $newHeight

Return Value

array

at line 494
Image sharpen()

Sharpens image a little bit.

Return Value

Image

at line 509
Image place(Image $image, int|string $left = 0, int|string $top = 0, int $opacity = 100)

Puts another image into this image. Left and top accepts pixels or percent.

Parameters

Image $image
int|string $left
int|string $top
int $opacity 0..100

Return Value

Image

at line 571
void save(string $file, int|null $quality = null, int|null $type = null)

Saves image to the file. Quality is in the range 0..100 for JPEG (default 85) and WEBP (default 80) and 0..9 for PNG (default 9).

Parameters

string $file
int|null $quality
int|null $type

Return Value

void

Exceptions

ImageException

at line 590
string toString(int $type = self::JPEG, int|null $quality = null)

Outputs image to string. Quality is in the range 0..100 for JPEG (default 85) and WEBP (default 80) and 0..9 for PNG (default 9).

Parameters

int $type
int|null $quality

Return Value

string

at line 601
string __toString()

Outputs image to string.

Return Value

string

at line 611
void send(int $type = self::JPEG, int|null $quality = null)

Outputs image to browser. Quality is in the range 0..100 for JPEG (default 85) and WEBP (default 80) and 0..9 for PNG (default 9).

Parameters

int $type
int|null $quality

Return Value

void

Exceptions

ImageException

at line 662
mixed __call(string $name, array $args)

Call to undefined method.

Parameters

string $name
array $args

Return Value

mixed

Exceptions

MemberAccessException

at line 697
__clone()

No description

at line 722
array __sleep()

Prevents serialization.

Return Value

array

at line 97
Image affine(array $affine, array $clip = null)

No description

Parameters

array $affine
array $clip

Return Value

Image

at line 97
array affineMatrixConcat(array $m1, array $m2)

No description

Parameters

array $m1
array $m2

Return Value

array

at line 97
array affineMatrixGet(int $type, mixed $options = null)

No description

Parameters

int $type
mixed $options

Return Value

array

at line 97
void alphaBlending(bool $on)

No description

Parameters

bool $on

Return Value

void

at line 97
void antialias(bool $on)

No description

Parameters

bool $on

Return Value

void

at line 97
void arc(mixed $x, mixed $y, mixed $w, mixed $h, mixed $start, mixed $end, mixed $color)

No description

Parameters

mixed $x
mixed $y
mixed $w
mixed $h
mixed $start
mixed $end
mixed $color

Return Value

void

at line 97
void char(int $font, mixed $x, mixed $y, string $char, mixed $color)

No description

Parameters

int $font
mixed $x
mixed $y
string $char
mixed $color

Return Value

void

at line 97
void charUp(int $font, mixed $x, mixed $y, string $char, mixed $color)

No description

Parameters

int $font
mixed $x
mixed $y
string $char
mixed $color

Return Value

void

at line 97
int colorAllocate(mixed $red, mixed $green, mixed $blue)

No description

Parameters

mixed $red
mixed $green
mixed $blue

Return Value

int

at line 97
int colorAllocateAlpha(mixed $red, mixed $green, mixed $blue, mixed $alpha)

No description

Parameters

mixed $red
mixed $green
mixed $blue
mixed $alpha

Return Value

int

at line 97
int colorAt(mixed $x, mixed $y)

No description

Parameters

mixed $x
mixed $y

Return Value

int

at line 97
int colorClosest(mixed $red, mixed $green, mixed $blue)

No description

Parameters

mixed $red
mixed $green
mixed $blue

Return Value

int

at line 97
int colorClosestAlpha(mixed $red, mixed $green, mixed $blue, mixed $alpha)

No description

Parameters

mixed $red
mixed $green
mixed $blue
mixed $alpha

Return Value

int

at line 97
int colorClosestHWB(mixed $red, mixed $green, mixed $blue)

No description

Parameters

mixed $red
mixed $green
mixed $blue

Return Value

int

at line 97
void colorDeallocate(mixed $color)

No description

Parameters

mixed $color

Return Value

void

at line 97
int colorExact(mixed $red, mixed $green, mixed $blue)

No description

Parameters

mixed $red
mixed $green
mixed $blue

Return Value

int

at line 97
int colorExactAlpha(mixed $red, mixed $green, mixed $blue, mixed $alpha)

No description

Parameters

mixed $red
mixed $green
mixed $blue
mixed $alpha

Return Value

int

at line 97
void colorMatch(Image $image2)

No description

Parameters

Image $image2

Return Value

void

at line 97
int colorResolve(mixed $red, mixed $green, mixed $blue)

No description

Parameters

mixed $red
mixed $green
mixed $blue

Return Value

int

at line 97
int colorResolveAlpha(mixed $red, mixed $green, mixed $blue, mixed $alpha)

No description

Parameters

mixed $red
mixed $green
mixed $blue
mixed $alpha

Return Value

int

at line 97
void colorSet(mixed $index, mixed $red, mixed $green, mixed $blue)

No description

Parameters

mixed $index
mixed $red
mixed $green
mixed $blue

Return Value

void

at line 97
array colorsForIndex(mixed $index)

No description

Parameters

mixed $index

Return Value

array

at line 97
int colorsTotal()

No description

Return Value

int

at line 97
int colorTransparent(mixed $color)

No description

Parameters

mixed $color

Return Value

int

at line 97
void convolution(array $matrix, float $div, float $offset)

No description

Parameters

array $matrix
float $div
float $offset

Return Value

void

at line 97
void copy(Image $src, mixed $dstX, mixed $dstY, mixed $srcX, mixed $srcY, mixed $srcW, mixed $srcH)

No description

Parameters

Image $src
mixed $dstX
mixed $dstY
mixed $srcX
mixed $srcY
mixed $srcW
mixed $srcH

Return Value

void

at line 97
void copyMerge(Image $src, mixed $dstX, mixed $dstY, mixed $srcX, mixed $srcY, mixed $srcW, mixed $srcH, mixed $opacity)

No description

Parameters

Image $src
mixed $dstX
mixed $dstY
mixed $srcX
mixed $srcY
mixed $srcW
mixed $srcH
mixed $opacity

Return Value

void

at line 97
void copyMergeGray(Image $src, mixed $dstX, mixed $dstY, mixed $srcX, mixed $srcY, mixed $srcW, mixed $srcH, mixed $opacity)

No description

Parameters

Image $src
mixed $dstX
mixed $dstY
mixed $srcX
mixed $srcY
mixed $srcW
mixed $srcH
mixed $opacity

Return Value

void

at line 97
void copyResampled(Image $src, mixed $dstX, mixed $dstY, mixed $srcX, mixed $srcY, mixed $dstW, mixed $dstH, mixed $srcW, mixed $srcH)

No description

Parameters

Image $src
mixed $dstX
mixed $dstY
mixed $srcX
mixed $srcY
mixed $dstW
mixed $dstH
mixed $srcW
mixed $srcH

Return Value

void

at line 97
void copyResized(Image $src, mixed $dstX, mixed $dstY, mixed $srcX, mixed $srcY, mixed $dstW, mixed $dstH, mixed $srcW, mixed $srcH)

No description

Parameters

Image $src
mixed $dstX
mixed $dstY
mixed $srcX
mixed $srcY
mixed $dstW
mixed $dstH
mixed $srcW
mixed $srcH

Return Value

void

at line 97
Image cropAuto(int $mode = -1, float $threshold = .5, int $color = -1)

No description

Parameters

int $mode
float $threshold
int $color

Return Value

Image

at line 97
void ellipse(mixed $cx, mixed $cy, mixed $w, mixed $h, mixed $color)

No description

Parameters

mixed $cx
mixed $cy
mixed $w
mixed $h
mixed $color

Return Value

void

at line 97
void fill(mixed $x, mixed $y, mixed $color)

No description

Parameters

mixed $x
mixed $y
mixed $color

Return Value

void

at line 97
void filledArc(mixed $cx, mixed $cy, mixed $w, mixed $h, mixed $s, mixed $e, mixed $color, mixed $style)

No description

Parameters

mixed $cx
mixed $cy
mixed $w
mixed $h
mixed $s
mixed $e
mixed $color
mixed $style

Return Value

void

at line 97
void filledEllipse(mixed $cx, mixed $cy, mixed $w, mixed $h, mixed $color)

No description

Parameters

mixed $cx
mixed $cy
mixed $w
mixed $h
mixed $color

Return Value

void

at line 97
void filledPolygon(array $points, mixed $numPoints, mixed $color)

No description

Parameters

array $points
mixed $numPoints
mixed $color

Return Value

void

at line 97
void filledRectangle(mixed $x1, mixed $y1, mixed $x2, mixed $y2, mixed $color)

No description

Parameters

mixed $x1
mixed $y1
mixed $x2
mixed $y2
mixed $color

Return Value

void

at line 97
void fillToBorder(mixed $x, mixed $y, mixed $border, mixed $color)

No description

Parameters

mixed $x
mixed $y
mixed $border
mixed $color

Return Value

void

at line 97
void filter(mixed $filtertype)

No description

Parameters

mixed $filtertype

Return Value

void

at line 97
void flip(int $mode)

No description

Parameters

int $mode

Return Value

void

at line 97
array ftText(mixed $size, mixed $angle, mixed $x, mixed $y, mixed $col, string $fontFile, string $text, array $extrainfo = null)

No description

Parameters

mixed $size
mixed $angle
mixed $x
mixed $y
mixed $col
string $fontFile
string $text
array $extrainfo

Return Value

array

at line 97
void gammaCorrect(float $inputgamma, float $outputgamma)

No description

Parameters

float $inputgamma
float $outputgamma

Return Value

void

at line 97
array getClip()

No description

Return Value

array

at line 97
int interlace(mixed $interlace)

No description

Parameters

mixed $interlace

Return Value

int

at line 97
bool isTrueColor()

No description

Return Value

bool

at line 97
void layerEffect(mixed $effect)

No description

Parameters

mixed $effect

Return Value

void

at line 97
void line(mixed $x1, mixed $y1, mixed $x2, mixed $y2, mixed $color)

No description

Parameters

mixed $x1
mixed $y1
mixed $x2
mixed $y2
mixed $color

Return Value

void

at line 97
void openPolygon(array $points, int $num_points, int $color)

No description

Parameters

array $points
int $num_points
int $color

Return Value

void

at line 97
void paletteCopy(Image $source)

No description

Parameters

Image $source

Return Value

void

at line 97
void paletteToTrueColor()

No description

Return Value

void

at line 97
void polygon(array $points, mixed $numPoints, mixed $color)

No description

Parameters

array $points
mixed $numPoints
mixed $color

Return Value

void

at line 97
array psText(string $text, mixed $font, mixed $size, mixed $color, mixed $backgroundColor, mixed $x, mixed $y, mixed $space, mixed $tightness, float $angle = null, mixed $antialiasSteps)

No description

Parameters

string $text
mixed $font
mixed $size
mixed $color
mixed $backgroundColor
mixed $x
mixed $y
mixed $space
mixed $tightness
float $angle
mixed $antialiasSteps

Return Value

array

at line 97
void rectangle(mixed $x1, mixed $y1, mixed $x2, mixed $y2, mixed $col)

No description

Parameters

mixed $x1
mixed $y1
mixed $x2
mixed $y2
mixed $col

Return Value

void

at line 97
mixed resolution(int $res_x = null, int $res_y = null)

No description

Parameters

int $res_x
int $res_y

Return Value

mixed

at line 97
Image rotate(float $angle, mixed $backgroundColor)

No description

Parameters

float $angle
mixed $backgroundColor

Return Value

Image

at line 97
void saveAlpha(bool $saveflag)

No description

Parameters

bool $saveflag

Return Value

void

at line 97
Image scale(int $newWidth, int $newHeight = -1, int $mode = IMG_BILINEAR_FIXED)

No description

Parameters

int $newWidth
int $newHeight
int $mode

Return Value

Image

at line 97
void setBrush(Image $brush)

No description

Parameters

Image $brush

Return Value

void

at line 97
void setClip(int $x1, int $y1, int $x2, int $y2)

No description

Parameters

int $x1
int $y1
int $x2
int $y2

Return Value

void

at line 97
void setInterpolation(int $method = IMG_BILINEAR_FIXED)

No description

Parameters

int $method

Return Value

void

at line 97
void setPixel(mixed $x, mixed $y, mixed $color)

No description

Parameters

mixed $x
mixed $y
mixed $color

Return Value

void

at line 97
void setStyle(array $style)

No description

Parameters

array $style

Return Value

void

at line 97
void setThickness(mixed $thickness)

No description

Parameters

mixed $thickness

Return Value

void

at line 97
void setTile(Image $tile)

No description

Parameters

Image $tile

Return Value

void

at line 97
void string(mixed $font, mixed $x, mixed $y, string $s, mixed $col)

No description

Parameters

mixed $font
mixed $x
mixed $y
string $s
mixed $col

Return Value

void

at line 97
void stringUp(mixed $font, mixed $x, mixed $y, string $s, mixed $col)

No description

Parameters

mixed $font
mixed $x
mixed $y
string $s
mixed $col

Return Value

void

at line 97
void trueColorToPalette(bool $dither, mixed $ncolors)

No description

Parameters

bool $dither
mixed $ncolors

Return Value

void

at line 97
array ttfText(mixed $size, mixed $angle, mixed $x, mixed $y, mixed $color, string $fontfile, string $text)

No description

Parameters

mixed $size
mixed $angle
mixed $x
mixed $y
mixed $color
string $fontfile
string $text

Return Value

array

Traits

Strict class for better experience.