Calling all Drupal developers!
Help us get this on the first page of Digg. DIGG NOW!
Help us get this on the first page of Digg. DIGG NOW!
1.15.2.4 (checked in on 2008/06/07 at 23:02:18 by dopry)
An ImageAPI supporting mulitple image toolkits. Image toolkits are implemented as modules. Images are objects, but have no methods
imageapi image api workflow...
$image = imageapi_image_open($path) to get an image object for $path... image_X($image, $arg1, $arg2) to manipulate image object... imageapi_image_close($image) to overwrite original image.
@todo: 2.x implement a fully OO image class with a proper constructor and methods. The methods will batch methods in an array, and call the underlying toolkits on close. See the ImageAPI ImageMagick toolkit for the proof of concept by Drewish.
| Name | Description |
|---|---|
| imageapi_default_toolkit | Retrieve the name of the currently used toolkit. |
| imageapi_get_available_toolkits | Return a list of available toolkits. |
| imageapi_hex2rgba | Convert a hex string to it's rgba integer components $hex can be in the formats: '#ABC','ABC','#ABCD','ABCD','#AABBCC','AABBCC','#AABBCCDD','AABBCCDD' |
| imageapi_image_close | Write an image to a file. |
| imageapi_image_crop | Crop an image to the rectangle specified by the given rectangle. |
| imageapi_image_desaturate | |
| imageapi_image_open | |
| imageapi_image_resize | Resize an image to the given dimensions (ignoring aspect ratio). |
| imageapi_image_rotate | Rotate an image by the given number of degrees. |
| imageapi_image_scale | Scales an image to the given width and height while maintaining aspect ratio. |
| imageapi_image_scale_and_crop | Scales an image to the exact width and height given. Achieves the target aspect ratio by cropping the original image equally on both sides, or equally on the top and bottom. This function is, for example, useful to create uniform sized avatars from... |
| imageapi_menu | |
| imageapi_settings |