Transaction Engine 3 Application Programming Interface
[ class tree: Transaction Engine 3 Application Programming Interface ] [ index: Transaction Engine 3 Application Programming Interface ] [ all elements ]

Class: KT_image

Source Location: /common/lib/image/KT_Image.class.php

Class Overview


manipulate images;


Author(s):

Methods



Class Details

[line 10]
manipulate images;



Tags:

access:  public


[ Top ]


Class Methods


constructor KT_image [line 72]

KT_image KT_image( )

Constructor. Set default values for some variables



Tags:

access:  public


[ Top ]

method addCommand [line 107]

nothing; addCommand( string $command)

prepend in front of the commands array a new command;



Tags:

access:  public


Parameters:

string   $command  

[ Top ]

method adjustQuality [line 440]

nothing; adjustQuality( string $filename, integer $qualityLevel)

adjust the Quality of an image;



Tags:

access:  public


Parameters:

string   $filename   path to the source file;
integer   $qualityLevel   the quality;

[ Top ]

method blur [line 955]

nothing; blur( string $filename, [integer $intensity = 1])

apply an gaussian blur mask on the image;



Tags:

access:  public


Parameters:

string   $filename   to the source file
integer   $intensity   intensity of the filter;

[ Top ]

method brightness [line 1140]

nothing; brightness( string $filename, string $direction)

increase or decrease the brightness of an image;



Tags:

access:  public


Parameters:

string   $filename   to the source file
string   $direction   increase or decrease;

[ Top ]

method contrast [line 1044]

nothing; contrast( string $filename, string $direction)

increase or decrease the contrast of an image;



Tags:

access:  public


Parameters:

string   $filename   to the source file
string   $direction   increase or decrease;

[ Top ]

method crop [line 522]

nothing; crop( mixed $filename, integer $x, integer $y, mixed $width, mixed $height, string $filenamepath, integer $destWidth, integer $destHeight)

crop an image;



Tags:

access:  public


Parameters:

string   $filenamepath   to the source file
integer   $x   top left of the picture;
integer   $y   top left of the picture;
integer   $destWidth   width of the new picture;
integer   $destHeight   height of the new picture;

[ Top ]

method flip [line 778]

nothing; flip( string $filename, string $direction)

flip an image horisontally or vertically;



Tags:

access:  public


Parameters:

string   $filename   to the source file
string   $direction   how to flip horisontal or vertical;

[ Top ]

method getError [line 1566]

array getError( )

Getter. return the errors setted.



Tags:

return:  array - 0=>error for user, 1=>error for developer;
access:  public


[ Top ]

method getGdNoSupport [line 1333]

string getGdNoSupport( )

return the a string if it GD has support for the current picture type;



Tags:

return:  ;


[ Top ]

method getImageMagickPath [line 1474]

string getImageMagickPath( )

gets the path of the succesfully executed Image Magick command (if any);



Tags:

return:  the command path
access:  public


[ Top ]

method getVersionGd [line 1417]

string getVersionGd( )

return the version of the GD;



Tags:

return:  return the version of the GD;
access:  public


[ Top ]

method hasError [line 1553]

boolean hasError( )

check if an error was setted.



Tags:

return:  true if error is set or false if not;
access:  public


[ Top ]

method imageSize [line 125]

array imageSize( string $sourceFileName)

take a file name as the only argument and return an array conatining the image dimensions;



Tags:

return:  (x, y) on succes, [array] (-1, -1) on error;
access:  public


Parameters:

string   $sourceFileName   path to the source file;

[ Top ]

method is_readable [line 1512]

void is_readable( mixed $file)



[ Top ]

method resize [line 162]

nothing; resize( string $sourceFileName, string $folder, string $destinationFileName, mixed $width, mixed $height, boolean $keepProportion, integer $newWidth, integer $newHeight)

resize an image;



Tags:

access:  public


Parameters:

string   $sourceFileName   path to the source file;
string   $folder   path to the destination file (without filename);
string   $destinationFileName   nama of the destination file;
integer   $newWidth   new width of the file
integer   $newHeight   new hight of the file;
boolean   $keepProportion   if the proportion must be kept or not;

[ Top ]

method rotate [line 612]

nothing; rotate( string $filename, mixed $degree, integer $degrees)

rotate an image;



Tags:

access:  public


Parameters:

string   $filename   to the source file
integer   $degrees   to rotate the image clockwise;

[ Top ]

method setPreferedLib [line 91]

nothing; setPreferedLib( string $lib)

setter. change the order of the execution for libs;



Tags:

access:  public


Parameters:

string   $lib   lib name: gd or imagemagick

[ Top ]

method sharpen [line 879]

nothing; sharpen( string $filename, [integer $intensity = 5])

apply an unsharp mask on the image;



Tags:

access:  public


Parameters:

string   $filename   to the source file
integer   $intensity   ;

[ Top ]

method thumbnail [line 303]

nothing; thumbnail( string $sourceFileName, string $folder, string $destinationFileName, mixed $width, mixed $height, boolean $keepProportion, integer $newWidth, integer $newHeight)

makes a thumbnail from an image;



Tags:

access:  public


Parameters:

string   $sourceFileName   path to the source file;
string   $folder   path to the destination file (without filename);
string   $destinationFileName   nama of the destination file;
integer   $newWidth   new width of the file
integer   $newHeight   new hight of the file;
boolean   $keepProportion   if the proportion must be kept or not;

[ Top ]



Documentation generated on Tue, 6 Dec 2005 15:11:32 +0200 by phpDocumentor 1.3.0RC3