com.lokorin.lokorin.lib
[ class tree: com.lokorin.lokorin.lib ] [ index: com.lokorin.lokorin.lib ] [ all elements ]

Procedural File: lib_images.php

Source Location: /_includes/lib_images.php



Page Details:

A library that contains everything that has to do with images and loading graphical elements.



Tags:

filesource:  Source Code for this file
license:  GNU Lesser General Public License
version:  $Revision: 1.11 $
author:  Andreas Launila


Includes:

require_once('common.php') [line 19]
For access to common constants and functions.






MAX_FILE_SIZE [line 32]

MAX_FILE_SIZE = 40
The default maximum file size in kB to allow image to have.



Tags:

access:  private

[ Top ]



MAX_WIDTH [line 26]

MAX_WIDTH = 500
The default maximum width to allow image to have.



Tags:

access:  private

[ Top ]



THUMB_SIZE [line 44]

THUMB_SIZE = 25
The default file size in kB that a produced thumbnail image should aim at.



Tags:

access:  private

[ Top ]



THUMB_WIDTH [line 38]

THUMB_WIDTH = 450
The default width a produced thumbnail image should have.



Tags:

access:  private

[ Top ]




getImage [line 67]

string getImage( string $imageName, [string $alt = ''], [integer $maxWidth = MAX_WIDTH], [integer $maxSize = MAX_FILE_SIZE], [integer $thumbWidth = THUMB_WIDTH], [integer $thumbSize = THUMB_SIZE])

Gets the XHTML code for an image within the defined paramaters. If the default source of the specified image does not meet the define parameters then the function created an resized version of the image so that does.



Tags:

return:  XHTML compliant code representing the specified image within the specified parameters.
access:  public


Parameters

string   $imageName   The name of the image i.e. 'foo.jpg' that should be retrived.
string   $alt   An optional alternative text to be used with the image. The text will be displayed if the image can not, for some reason, be displayed.
integer   $maxWidth   The maximum width in pixels that the image is allowed to have.
integer   $maxSize   The maximum size in kilobytes that the image is allowed to have.
integer   $thumbWidth   The width in pixels that a resized image should have.
integer   $thumbSize   The size in kilobytes that a resized image should aim for.
[ Top ]



getImageCode [line 145]

string getImageCode( string $imagePath, [string $alt = ''], [string $title = ''], [mixed $cssClass = ''], string $class)

Gets the XHTML code for a specified image.



Tags:

return:  XHTML compliant code representing the image.
access:  public


Parameters

string   $imagePath   The path to the image relative to the page root.
string   $alt   An optional alternative text to be used with the image. The text will be displayed if the image can not, for some reason, be displayed.
string   $title   An optional title for the image. The title will show up if the user holds the cursor over the image.
string   $class   An optional css class to use for the image element.
[ Top ]



getImageResource [line 168]

imageResource getImageResource( string $path)

Gets the image resource of the specified image file.



Tags:

return:  An image resource or a boolean false if something went wrong.
access:  private


Parameters

string   $path   The path to the image file.
[ Top ]



Documentation generated on Sun, 16 Apr 2006 21:03:34 +0200 by phpDocumentor 1.3.0RC4