LDAP Account Manager

ImageManipulatorGd
in package
implements ImageManipulator

Manipulates images using gd library.

Tags
author

Roland Gruber

Interfaces, Classes, Traits and Enums

ImageManipulator
Modifies images.

Table of Contents

$image  : GdImage|false
Image
$type  : int
GD image type
__construct()  : mixed
Constructor.
__destruct()  : mixed
Destructor
convertToJpeg()  : void
Converts the image to JPEG format.
crop()  : void
Crops the image.
getHeight()  : int
Returns the height of the image.
getImageData()  : string
Returns the image as binary string.
getWidth()  : int
Returns the width of the image.
thumbnail()  : void
Resizes the image to the given maximum dimensions.

Properties

$image

Image

private GdImage|false $image

image

$type

GD image type

private int $type

image type

Methods

__construct()

Constructor.

public __construct(string $imageData) : mixed
Parameters
$imageData : string

original image as binary string

Tags
throws
LAMException

error reading image

Return values
mixed

__destruct()

Destructor

public __destruct() : mixed
Return values
mixed

convertToJpeg()

Converts the image to JPEG format.

public convertToJpeg() : void
Tags
see
ImageManipulator::getAsJpeg()
Return values
void

crop()

Crops the image.

public crop(int $x, int $y, int $width, int $height) : void
Parameters
$x : int

starting point in original image

$y : int

starting point in original image

$width : int

width of target size

$height : int

height of target size

Tags
see
ImageManipulator::crop()
Return values
void

thumbnail()

Resizes the image to the given maximum dimensions.

public thumbnail(int $width, int $height) : void
Parameters
$width : int

width

$height : int

height

Tags
see
ImageManipulator::resize()
Return values
void

Search results