ImageEditorHandles the basic image editing capbabilities.
Located in /plugins/ImageManager/Classes/ImageEditor.php (line 18)
Constructor ImageEditor (line 47)
Create a new ImageEditor instance. Editing requires a
tmp file, which is saved in the current directory where the image is edited. The tmp file is assigned by md5 hash of the user IP address. This hashed is used as an ID for cleaning up the tmp files. In addition, any tmp files older than the the specified period will be deleted.
cleanUp (line 342)
Delete any tmp image files.
createUnique (line 318)
Create unique tmp image file name.
The filename is based on the tmp file prefix specified in config.inc.php plus the UID (basically a md5 of the remote IP) and some random 6 character string. This function also calls to clean up the tmp files.
getAction (line 289)
Get the action GET parameter
getDefaultSaveFile (line 220)
Get the default save file name, used by editor.php.
getImageType (line 380)
Get the image type base on an image file.
getSaveFileName (line 194)
Get the file name base on the save name and the save type.
getUniqueFilename (line 236)
Get a unique filename. If the file exists, the filename base is appended with an increasing integer.
isFileSaved (line 58)
Did we save a file?
isGDEditable (line 407)
Check if the specified image can be edit by GD
mainly to check that GD can read and save GIFs
isGDGIFAble (line 433)
Check if GIF can be edit by GD.
makeRelative (line 275)
Specifiy the original relative path, a new filename and return the new filename with relative path.
i.e. $pathA (-filename) + $file
processAction (line 114)
Process the actions, crop, scale(resize), rotate, flip, and save.
When ever an action is performed, the result is save into a temporary image file, see createUnique on the filename specs. It does not return the saved file, alway returning the tmp file.
processImage (line 69)
Process the image, if not action, just display the image.
uniqueStr (line 302)
Generate a unique string based on md5(microtime()).
Well not so uniqe, as it is limited to 6 characters
Documentation generated on Sat, 31 Dec 2005 14:56:53 -0500 by phpDocumentor 1.3.0RC3