Graphical
[ class tree: Graphical ] [ index: Graphical ] [ all elements ]

Class: GFXimages

Source Location: /GFXimages.php

Class Overview


This class manages GFXimages. This is a collection of image manipulation functions.


Author(s):

Version:

  • 1.0

Variables

Methods



Class Details

[line 31]
This class manages GFXimages. This is a collection of image manipulation functions.

Created on 26 aug 09

Changes: 1.0 -> 1.0: 26 aug 09 added: xxx




Tags:

author:  Pierre-Dominique Vienne <pvienne@me.com>
version:  1.0
license:  GNU Public License


[ Top ]


Class Variables

$debug =  false

[line 84]

Variable that contains debug switch



Tags:

access:  public

Type:   bool


[ Top ]

$dominant_blue =

[line 78]

Variable that contains dominant color hexadecimal position for blue



Tags:

access:  public

Type:   string


[ Top ]

$dominant_green =

[line 73]

Variable that contains dominant color hexadecimal position for green



Tags:

access:  public

Type:   string


[ Top ]

$dominant_red =

[line 68]

Variable that contains dominant color hexadecimal position for red



Tags:

access:  public

Type:   string


[ Top ]

$filename =

[line 37]

Variable that contains original filename



Tags:

access:  public

Type:   string


[ Top ]

$jpeg_quality =  75

[line 62]

Variable that contains used JPEG quality



Tags:

access:  public

Type:   int


[ Top ]

$thumb_dir =

[line 47]

Variable that contains thumbnail directory



Tags:

access:  public

Type:   string


[ Top ]

$thumb_filename =

[line 42]

Variable that contains thumbnail filename



Tags:

access:  public

Type:   string


[ Top ]

$thumb_height =  70

[line 52]

Variable that contains thumbnail height in pixels



Tags:

access:  public

Type:   int


[ Top ]

$thumb_width =  52

[line 57]

Variable that contains thumbnail width in pixels



Tags:

access:  public

Type:   int


[ Top ]



Class Methods


method createGFXimageThumb [line 126]

object createGFXimageThumb( string $this->filename, string $this->thumb_filename, string $this->thumb_dir, int $this->thumb_height, int $this->thumb_width, int $this->jpeg_quality)

Thumb creation function

This function is used to create a thumbnail from a specified image. Result is returned and file is generated if possible

  1.  <?php
  2.  $oImage                  new GFXimages();
  3.  $oImage->filename        $pathtofilenametoreduce;
  4.  $oImage->thumb_filename  $filenameofthethumb;
  5.  $oImage->thumb_dir       $pathtothethumb;
  6.  $oImage->thumb_height    100;
  7.  $oImage->thumb_width     80;
  8.  $oImage->jpeg_quality    60;
  9.  echo $oImage->createGFXimageThumb()->thumb_filename;
  10.  // $filenameofthethumb
  11.  ?>




Tags:

since:  Version 1.0
uses:  Files::RemoveExtension();


Parameters:

string   $this->filename   name of the original file (required)
string   $this->thumb_filename   name of the thumbnail (required)
string   $this->thumb_dir   directory where to store the thumbnail (required)
int   $this->thumb_height   height in pixels of the thumbnail
int   $this->thumb_width   width in pixels of the thumbnail
int   $this->jpeg_quality   JPEG quality used for the thumbnail

[ Top ]

method getGFXimageDominantColor [line 328]

object getGFXimageDominantColor( string $this->filename)

Dominant color obtention function

This function is used to get the dominant color of an image. Result is returned as an object.

  1.  <?php
  2.  $oImage                  new GFXimages();
  3.  $oImage->filename        $pathtofilenametoreduce;
  4.  // F3
  5.  ?>




Tags:

since:  Version 1.0


Parameters:

string   $this->filename   name of the original file (required)

[ Top ]


Documentation generated on Wed, 26 Aug 2009 12:30:16 +0200 by phpDocumentor 1.4.1