Class: NetPbmToolkit
Source Location: /modules/netpbm/classes/NetPbmToolkit.class
Class NetPbmToolkit
Inherited Properties, Constants, and Methods
Method Summary
| array |
_convertFromPnmCmd() |
Generate the correct command to convert an image type from PNM. |
| array |
_convertToPnmCmd() |
Generate the correct command to convert an image type to PNM. |
| array |
_exec() |
Execute the command. Flatten the command array first. |
| array |
_extractCommands() |
Extract a single array of commands from a multilevel array of commands |
| void |
_pnmCmd() |
Return the full path to the NetPBM command |
Methods
void getProperty(
$mimeType,
$propertyName,
$sourceFilename
)
|
|
Parameters:
|
|
$mimeType: |
|
|
|
$propertyName: |
|
|
|
$sourceFilename: |
|
API Tags:
| See: | GalleryToolkit::getProperty |
Redefinition of:
- GalleryToolkit::getProperty()
- Get a certain property of a file
void performOperation(
$mimeType,
$operationName,
$sourceFilename,
$destFilename,
$parameters, [
$context = array()]
)
|
|
Parameters:
|
|
$mimeType: |
|
|
|
$operationName: |
|
|
|
$sourceFilename: |
|
|
|
$destFilename: |
|
|
|
$parameters: |
|
|
|
$context: |
|
API Tags:
| See: | GalleryToolkit::performOperation |
Redefinition of:
- GalleryToolkit::performOperation()
- Perform a certain operation
array _convertFromPnmCmd(
string
$mimeType, string
$filename, [string
$jpegQuality = null]
)
|
|
Generate the correct command to convert an image type from PNM.
Parameters:
|
string |
$mimeType: |
|
|
string |
$filename: |
the path to an image file |
|
string |
$jpegQuality: |
(optional) override module setting for jpeg quality |
API Tags:
| Return: | GalleryStatus a status code, array 1 or more string commands |
array _convertToPnmCmd(
string
$mimeType, string
$filename
)
|
|
Generate the correct command to convert an image type to PNM.
Parameters:
|
string |
$mimeType: |
|
|
string |
$filename: |
the path to an image file |
API Tags:
| Return: | GalleryStatus a status code, array 1 or more string commands |
void _deleteTempFiles(
&$context
)
|
|
Delete temp files used by composite operation
Parameters:
array _exec(
array
$cmdArray
)
|
|
Execute the command. Flatten the command array first.
Parameters:
API Tags:
| Return: | GalleryStatus a status code string stdout output, string stderr output |
| Access: | private |
array _extractCommands(
array
$cmdArray, [int
$level = 0]
)
|
|
Extract a single array of commands from a multilevel array of commands
The command array may wind up being multilevel, eg: array( array('cmd', 'args'), array('cmd', 'args'), array( array('cmd', 'args'), array('cmd', 'args') ), ) Extract the commands as a single level array: array( array('cmd', 'args'), array('cmd', 'args'), array('cmd', 'args'), array('cmd', 'args') ) While maintaining the order.
Parameters:
|
array |
$cmdArray: |
a multilevel set of commands |
|
int |
$level: |
(unused?) |
API Tags:
| Return: | a single level set of commands |
void _getImageDimensions(
$mimeType,
$filename
)
|
|
Parameters:
API Tags:
| See: | GalleryToolkit::getImageDimensions |
void _pnmCmd(
string
$cmd
)
|
|
Return the full path to the NetPBM command
Parameters:
|
string |
$cmd: |
a netpbm command (eg. "giftopnm") |
API Tags:
GalleryStatus _transformImage(
string
$mimeType, array
$command, string
$sourceFilename, string
$destFilename, string
$outputMimeType, [boolean
$preserveMetaData = true], [string
$jpegQuality = null]
)
|
|
Do the given transform on the source image
Parameters:
|
string |
$mimeType: |
a mime type |
|
array |
$command: |
the command(s) to execute |
|
string |
$sourceFilename: |
the path to a source file |
|
string |
$destFilename: |
the path to a destination file |
|
string |
$outputMimeType: |
|
|
boolean |
$preserveMetaData: |
(optional) whether to use jhead to preserve exif data |
|
string |
$jpegQuality: |
(optional) override module setting for jpeq quality |
API Tags:
|
|