phorum_api_image_supported (line 382)
Check if platform support is available for scaling images.
boolean|string
phorum_api_image_supported
()
phorum_api_image_thumbnail (line 84)
Create an image thumbnail.
This function can be used to create a scaled down thumbnail version of an image. You can specifiy a width and/or a height to which to scale down the image. The aspect ratio will always be kept. If both a width and height are provided, then the one which requires the largest scale down will be leading.
mixed
phorum_api_image_thumbnail
(string $image, [integer $max_w = NULL], [integer $max_h = NULL], [string $method = NULL])
-
string
$image: The raw binary image data.
-
integer
$max_w: The maximum allowed width for the image in pixels. Use NULL or 0 (zero) to indicate that any width will do.
-
integer
$max_h: The maximum allowed height for the image in pixels. Use NULL or 0 (zero) to indicate that any height will do.
-
string
$method: The method to use for scaling the image. By default, this function will try to autodetect a working method. Providing a $method parameter is mostly useful for debugging purposes. Available methods (in the order in which they are probed in the code) are:
- gd: using the GD library (requires extension "gd")
- imagick: using the ImageMagick library (requires extension "imagick")
- convert: using the ImageMagick "convert" tool (requires the
ImageMagick package to be installed on the server, does not work
in combination with some PHP safety restrictions).