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

Class: Image_Transform_Driver_NetPBM

Source Location: /main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/NetPBM.php

Class Overview

Image_Transform
   |
   --Image_Transform_Driver_NetPBM

The main "Image_Resize" class is a container and base class which provides the static methods for creating Image objects as well as some utility functions (maths) common to all parts of Image Resize.


Author(s):

Version:

  • 1.00

Variables

Methods


Inherited Variables

Inherited Methods

Class: Image_Transform

Image_Transform::addBorder()
Image_Transform::addDropShadow()
Image_Transform::addText()
Image_Transform::cleanUp()
Image_Transform::colorarray2colorhex()
Reverse of rgb2colorname.
Image_Transform::colorhex2colorarray()
Reverse of rgb2colorname.
Image_Transform::createUnique()
Image_Transform::crop()
Image_Transform::display()
Place holder for the real display method used by extended methods to do the resizing
Image_Transform::factory()
Create a new Image_resize object
Image_Transform::flip()
Image_Transform::free()
Place holder for the real free method used by extended methods to do the resizing
Image_Transform::gamma()
Image_Transform::getImageType()
Get the type of the image being manipulated
Image_Transform::getWebSafeFormat()
Image_Transform::load()
Place holder for the real load method used by extended methods to do the resizing
Image_Transform::resize()
Resize the Image in the X and/or Y direction If either is 0 it will be scaled proportionally
Image_Transform::save()
Place holder for the real save method used by extended methods to do the resizing
Image_Transform::scale()
Scale Image to a maximum or percentage
Image_Transform::scaleByFactor()
Scales an image to a factor of its original size. For example, if my image was 640x480 and I called scaleByFactor(0.5) then the image would be resized to 320x240.
Image_Transform::scaleByLength()
Scales an image so that the longest side has this dimension.
Image_Transform::scaleByPercentage()
Scales an image to a percentage of its original size. For example, if my image was 640x480 and I called scaleByPercentage(10) then the image would be resized to 64x48
Image_Transform::scaleMaxX()
Scale the image to have the max x dimension specified.
Image_Transform::scaleMaxY()
Scale the image to have the max y dimension specified.
Image_Transform::uniqueStr()
Image_Transform::_get_image_details()
Image_Transform::_parse_size()
Parse input and convert If either is 0 it will be scaled proportionally
Image_Transform::_resize()
Place holder for the real resize method used by extended methods to do the resizing
Image_Transform::_set_img_x()
Set the image width
Image_Transform::_set_img_y()
Set the image height
Image_Transform::_set_new_x()
Set the image width
Image_Transform::_set_new_y()
Set the image height

Class Details

[line 33]
The main "Image_Resize" class is a container and base class which provides the static methods for creating Image objects as well as some utility functions (maths) common to all parts of Image Resize.

The object model of DB is as follows (indentation means inheritance):

Image_Resize The base for each Image implementation. Provides default | implementations (in OO lingo virtual methods) for | the actual Image implementations as well as a bunch of | maths methods. | +-Image_GD The Image implementation for the PHP GD extension . Inherits Image_Resize When calling DB::setup for GD images the object returned is an instance of this class.




Tags:

author:  Peter Bowyer <peter@mapledesign.co.uk>
version:  1.00


[ Top ]


Class Variables

$command = array()

[line 40]

associative array commands to be executed


Type:   array


[ Top ]



Class Methods


constructor Image_Transform_Driver_NetPBM [line 45]

Image_Transform_Driver_NetPBM Image_Transform_Driver_NetPBM( )

Class Constructor



[ Top ]

method addText [line 163]

none addText( array $params)

adds text to an image



Overrides Image_Transform::addText() (parent method not documented)

Parameters:

array   $params   options Array contains options array( 'text' // The string to draw 'x' // Horizontal position 'y' // Vertical Position 'Color' // Font color 'font' // Font to be used 'size' // Size of the fonts in pixel 'resize_first' // Tell if the image has to be resized // before drawing the text )

[ Top ]

method crop [line 93]

void crop( int $crop_x, int $crop_y, int $crop_width, int $crop_height)

Crop the image



Overrides Image_Transform::crop() (parent method not documented)

Parameters:

int   $crop_x   left column of the image
int   $crop_y   top row of the image
int   $crop_width   new cropped image width
int   $crop_height   new cropped image height

[ Top ]

method display [line 235]

none display( [string $type = null], [int $quality = 75])

Display image without saving and lose changes



Overrides Image_Transform::display() (Place holder for the real display method used by extended methods to do the resizing)

Parameters:

string   $type   (jpeg,png...);
int   $quality   75

[ Top ]

method flip [line 127]

void flip( boolean $horizontal)

Flip the image horizontally or vertically



Overrides Image_Transform::flip() (parent method not documented)

Parameters:

boolean   $horizontal   true if horizontal flip, vertical otherwise

[ Top ]

method free [line 249]

none free( )

Destroy image handle



Overrides Image_Transform::free() (Place holder for the real free method used by extended methods to do the resizing)

[ Top ]

method gamma [line 142]

none gamma( [float $outputgamma = 1.0])

Adjust the image gamma



Overrides Image_Transform::gamma() (parent method not documented)

Parameters:

float   $outputgamma  

[ Top ]

method load [line 60]

mixed load( string $image)

Load image



Tags:

return:  none or a PEAR error object on error
see:  PEAR::isError()


Overrides Image_Transform::load() (Place holder for the real load method used by extended methods to do the resizing)

Parameters:

string   $image   filename

[ Top ]

method rotate [line 104]

void rotate( int $angle)

Rotates the image



Parameters:

int   $angle   The angle to rotate the image through

[ Top ]

method save [line 213]

none save( $filename $filename, [string $type = null], [int $quality = 85])

Save the image file



Overrides Image_Transform::save() (Place holder for the real save method used by extended methods to do the resizing)

Parameters:

string   $type   (jpeg,png...);
int   $quality   75
$filename   $filename   string the name of the file to write to

[ Top ]

method _postProcess [line 180]

void _postProcess( $type, $quality, $save_type)



Parameters:

   $type  
   $quality  
   $save_type  

[ Top ]

method _resize [line 73]

none _resize( $new_x, $new_y)

Resizes the image



Tags:

see:  PEAR::isError()


Overrides Image_Transform::_resize() (Place holder for the real resize method used by extended methods to do the resizing)

Parameters:

   $new_x  
   $new_y  

[ Top ]


Documentation generated on Thu, 12 Jun 2008 14:07:25 -0500 by phpDocumentor 1.4.1