\Klutz_Image

Klutz Image Class

Summary

Methods
Properties
Constants
Klutz_Image()
$file
$data
$height
$width
$type
$size
$lastmodified
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$file

$file : string

The name of the file the image is stored in (if it's stored locally)

Type

string

$data

$data : string

The image data itself (binary)

Type

string

$height

$height : integer

The height of the image in pixels

Type

integer

$width

$width : integer

The width of the image in pixels

Type

integer

$type

$type : string

The mime type of the image

Type

string

$size

$size : string

The attributes to use in an <img> tag to define the size (e.g. height="120" width="400")

Type

string

$lastmodified

$lastmodified : integer

The last modified time of the file (only used if file is local).

Type

integer

Methods

Klutz_Image()

Klutz_Image(string  $image, string  $type = null, integer  $height = null, integer  $width = null) 

Constructor - Based on the information passed, loads an image, determines the size and type, etc., and stores the information in the various public properties. Any optional parameters not passed in are calculated to the best of our ability.

Parameters

string $image

Either raw image data or a filename

string $type

Image MIME type (e.g. image/jpeg)

integer $height

Height of the image in pixels

integer $width

Width of the image in pixels