.

IImageTools Interface Reference
[ImageTools]

Interface for image tool delegations. More...

Inheritance diagram for IImageTools:
ImageToolsGD

List of all members.

Public Member Functions

  create_from_binary_data ($data)
  Create an IImageInformation from a file.
  create_from_file ($file)
  Create an IImageInformation from a file.
  crop (IImageInformation $src, $x, $y, $width, $height)
  Cuts portion of image.
  fit (IImageInformation $src, $width, $height, $backgroundcolor=0xFFFFFF)
  Fit image in given height and width.
  resize (IImageInformation $src, $width, $height)
  Resize given image.
  resize_fit (IImageInformation $src, $width, $height)
  Resize given image.
  rotate (IImageInformation $src, $degrees, $backgroundcolor=0xFFFFFF)
  Rotate image.
  watermark (IImageInformation $src, $text=false)
  Add a Watermark.

Detailed Description

Interface for image tool delegations.

Uses either gd or imagick extension, if installed. imagick is preferred

Author:
Gerd Riesselmann

Definition at line 10 of file iimagetools.cls.php.


Member Function Documentation

IImageTools::create_from_binary_data ( data  ) 

Create an IImageInformation from a file.

Returns:
IImageInformation False on failure

Implemented in ImageToolsGD.

IImageTools::create_from_file ( file  ) 

Create an IImageInformation from a file.

Returns:
IImageInformation False on failure

Implemented in ImageToolsGD.

IImageTools::crop ( IImageInformation src,
x,
y,
width,
height  
)

Cuts portion of image.

Returns:
IImageInformation

Implemented in ImageToolsGD.

IImageTools::fit ( IImageInformation src,
width,
height,
backgroundcolor = 0xFFFFFF  
)

Fit image in given height and width.

If image is larger than given size, it will be downsampled. If it is smaller, it will be untouched. Ratio is not changed. Background is filled with $backgroundcolor

Returns:
IImageInformation False on failure

Implemented in ImageToolsGD.

IImageTools::resize ( IImageInformation src,
width,
height  
)

Resize given image.

Image is streched to fit

Returns:
IImageInformation False on failure

Implemented in ImageToolsGD.

IImageTools::resize_fit ( IImageInformation src,
width,
height  
)

Resize given image.

Image is not streched, so ratio is not changed.

Resizing an image of 200 x 100 to 100 x 100 will result in a image of size 100 x 50

Returns:
IImageInformation False on failure

Implemented in ImageToolsGD.

IImageTools::rotate ( IImageInformation src,
degrees,
backgroundcolor = 0xFFFFFF  
)

Rotate image.

Parameters:
IImageInformation  $src Image to rotate
float  $degrees Degrees to rotate (0-360)
int  $backgroundcolor Backgroundcolor of new portions
Returns:
IImageInformation False on failure

Implemented in ImageToolsGD.

IImageTools::watermark ( IImageInformation src,
text = false  
)

Add a Watermark.

Parameters:
IImageInformation  $src Image to add watermark to
string  $text Text of Watermark, if emtpy "© {Application Title}" is taken
Returns:
IImageInformation

Implemented in ImageToolsGD.


The documentation for this interface was generated from the following file: