Overview

Classes

  • Ws_logged_inModel
  • Ws_permissionsModel
  • Ws_role_permModel
  • Ws_rolesModel
  • Ws_user_roleModel
  • Ws_userModel
  • WsAuth
  • WsauthController
  • WsChart
  • WsConfig
  • WsController
  • WsDatabase
  • WsForm
  • WsImage
  • WsLocalize
  • WsModel
  • WsModelForm
  • WsModelGridView
  • WsUrl

Functions

  • __autoload
  • callHook
  • WsErrorHandler
  • Overview
  • Class

Class WsImage

WsImage Provides simple interface for working with images using GD library.

Example usage:

$img = new WsImage()

// load image from file
$img->read('public/img/webiness_white.png');

// add wattermark to image
$img->addWatermark('copyright (c) me@myaddress.com');

// show image thumbnail
$img->showThumbnail();

// show image
$img->show();
Located at WsImage.class.php
Methods summary
public
# __construct( )
public booleane
# read( string $file )

Read image from file.

Read image from file.

Parameters

$file

Image file name with path relative to application root directory

Returns

booleane
suceess or fail
public
# show( )

Show image in browser

Show image in browser

public
# showThumbnail( integer $width = 100, integer $height = 100, string $text = '' )

Show image thumbnail

Show image thumbnail

Parameters

$width
Thumbnail width
$height
Thumbnail height
$text
Thumbnail text
public
# addWatermark( string $text, integer $x = 8, integer $y = 8 , string $font = null, integer $size = 11 )

Add watermark text to image

Add watermark text to image

Parameters

$text
Watermark text
$x
Verical offset for text
$y
Horizontal offset for text
$font
Full path, relative to server root, of font file
$size
Font size
public integer
# getWidth( )

Get image width

Get image width

Returns

integer
$width Image width
public integer
# getHeight( )

Get image height

Get image height

Returns

integer
$height Image height
API documentation generated by ApiGen