net_siriux_photos_imagefilterImage Filter Class, used to post process all images, check the documentation of the individual methods.
Located in /net/siriux/photos/filter.php (line 24)
The constructor does a bit of variable initialization
Executes a custom image manipulation callback. The command name is the function that is searched. The function must use the following signature:
bool callback (string $infile, $string outfile, array $parameters);
infile is the file to be manipulated, outfile the name where the result has to be stored in (a temporary file usually) and the parameters passed to the command originally. It should return true on a successful transformation, false otherwise.
Automatic rotation for the image using EXIF tags.
NOTE: This REQUIRES php_read_exif to be present. It will fail if it is missing.
Filter Syntax: exifrotate()
Gamma-Adjustment of the image.
Filter Syntax: gamma($gamma)
Where $gamma is a positive floating point number, e.g. 1.2
This function will process a string-based filter chain. This is a semicolon-separated list of commands, which will be evaluated using process_command each.
Processing stops as soon as one filter command fails.
This is the main function evaluator of the filter class.
It will take a function style command like rotate(90), arguments are separated by commas, there is no quoting at the moment. All arguments are parsed as strings, function names need to be [a-z_]
Execution will relay to the corresponding filter function.
All filters will use defaults for missing arguments (which can result in a NULL operation) and will ignore excessive arguments.
Image Resize: This will resize the orignal image.
Filter Syntax: resize ($x, $y)
The width of the image in pixels, it will be scaled in proportion. One of the two parameters can be 0, meaning that the width/height of the image is adjusted to the other, given value.
The resize will be done only if it would not increase the image as this won't gain you any benifit.
Manual image rotation
Filter Syntax: rotate($rotate)
Where $gamma is a positive floating point number greater then 0 and less then 360; if omitted, a NULL operation is done.
Sets the filename of the image currently being edited.
This must be the full path to the file, the fill will be replaced with the modified image.
The process will check for write permission at this point, A return value of false will indicate some problem, see the MidCOM Debug Log for details.
TODO: Use ImageMagick Identify to check for a valid image.
Returns the name of a temporary file to be used to write the transformed image to. Has to be managed by the callee.
This will replace the original file with the processed copy of $tmpfile, deleting the temporary file afterwards.
Documentation generated on Mon, 21 Nov 2005 18:15:49 +0100 by phpDocumentor 1.3.0RC3