Constructor
obj
ImageProcessor
(string $thumbnailFormat, boolean $useGD, array $gdFormats, boolean $useImageMagick, string $ImageMagickPath, string $ImageMagickTempDir, array $ImageMagickFormats)
-
string
$thumbnailFormat: The mime type of the format you which thumbnails to be generated in. image/jpeg or image/png are recommended
-
boolean
$useGD: If true, the GD image libraries will be used to generate images of the formats that they support.
-
array
$gdFormats: An array of mime-types to handle with the GD libraries.
-
boolean
$useImageMagick: If true, the ImageMagick application will be called via the shell to resize images that it supports.
-
string
$ImageMagickPath: The path to the ImageMagick functions if ImageMagick is availible.
-
string
$ImageMagickTempDir: Directory in which to place images while processing.
-
array
$ImageMagickFormats: An array of mime-types to handle with ImageMagick.
Assign the configuration of this Manager. Valid configuration options are as follows:
thumbnail_format string (ex: 'image/jpeg')
use_gd boolean gd_formats array of strings (ex: array('image/jpeg', 'image/png')) An empty array indicates any/all supported formats.
use_imagemagick boolean
imagemagick_path string (ex: 'usr/bin' OR '/usr/X11R6/bin')
imagemagick_temp_dir string (ex: '/tmp')
imagemagick_formats array of strings (ex: array('image/jpeg', 'image/png')) An empty array indicates any/all supported formats.
void
assignConfiguration
(object Properties $configuration)
-
object Properties
$configuration: (original type: java.util.Properties)
Assign the context of this OsidManager.
void
assignOsidContext
(mixed $context, object OsidContext $context
)
-
object OsidContext
$context
Generate a thumbnail from the image format/data passed
string
generateThumbnailData
(string $format, string $data)
-
string
$format: The format of the source image
-
string
$data: The data of the source image
Return context of this OsidManager.
object OsidContext
getOsidContext
()
Generate a resized image from the image format/data passed
string
getResizedData
(string $format, mixed $size, string $data)
-
string
$format: The format of the source image
-
string
$data: The data of the source image
Get the format that a resized image will be returned in
string
getResizedFormat
(string $format)
-
string
$format: The format of the source image
Return the format that thumbnails will be generated in.
string
getThumbnailFormat
()
Generate a resized image from the image format/data passed
string
getWebsafeData
(string $format, mixed $size, string $data)
-
string
$format: The format of the source image
-
string
$data: The data of the source image
Get the format that a resized image will be returned in
string
getWebsafeFormat
(string $format)
-
string
$format: The format of the source image
Return true if the image format is supported.
boolean
isFormatSupported
(string $format)
-
string
$format: The mime type of the format in question.