Image class

The following sections explain each method of the class.

createCroppedThumbnail


public static bool createCroppedThumbnail ( string $source, float $width, float $height, string $savePath, float $clipping_x = 0, float $clipping_y = 0, float $clipping_width = 0, float $clipping_height = 0, int $quality = 100)

By means of createCroppedThumbnail method allows an image in a smaller version, a so-called thumbnail to convert. Use can also define the image.

Parameter list
source

The absolute path to decreasing image

with

The width of the thumbnails

height

The level of Thumbnails

savePath

The absolute file path of the thumbnails. In existence but already a file, it is overwritten.

clipping_x

The X coordinate of the image in the thumbnail cut

clipping_y

The Y coordinate of the image in the thumbnail clipping.

clipping_width

The Broad of the image in the thumbnail cutout

clipping_height

The height of the image in the thumbnail cutout

quality

The quality of the thumbnail. Allows from 0 bad to 100 perfect quality. By default set to 100.


optimizedImage (from v2.4.0)


public static bool optimizedImage ( string $source, int $quality = 85)

Optimized media file so that you have less memory but still consumes a high quality possesses. It also metadata will be removed.

Parameter list
source

The absolute path to the media file to be optimized.

quality

The quality of the media file to have it after optimization. From 0 (very little) to 100 (very high). The lower this value, the more can be optimized.


removeMetadata (from v2.4.0)


public static bool removeMetadata ( string $source)

Removes all metadata of an image

Parameter list
source

The absolute path to the image metadata is removed.


getImageHeight (from v2.1.0)


public static int|bool getImageHeight ( string $image)

Returns the original height of the image. .jpg, .jpeg, .gif are allowed and. png. The amount could not be determined, is a false back given.

Parameter list
image

The absolute path to the image file whose width is to be determined.


getImageWidth (from v2.1.0)


public static int|bool getImageWidth ( string $image)

Returns the original height of the image. .jpg, .jpeg, .gif are allowed and. png. The amount could not be determined, is a false back given.

Parameter list
image

The absolute path to the image file whose width is to be determined.