Class DefaultImageMagickService
java.lang.Object
de.hybris.platform.mediaconversion.imagemagick.BasicImageMagickStrategy
de.hybris.platform.mediaconversion.imagemagick.DefaultImageMagickService
- All Implemented Interfaces:
ImageMagickService
public class DefaultImageMagickService
extends BasicImageMagickStrategy
implements ImageMagickService
Default implementation of a
ImageMagickService backed by ImageMagick
.
Both ImageMagick executable (convert and identify in use will be executed by the auto
injected ProcessExecutor.
| Property | Meaning | Default |
|---|---|---|
imagemagick.bindir |
The binary directory of your local image magick installation. | *|
imagemagick.executable.convert |
The convert executable to call. |
convert |
imagemagick.executable.identify |
The identify executable to call. |
identify |
imagemagick.configuration.directory |
Path to the Configuration directory to use. | Lookup sequence is as follows:
|
Note: all environment variables relevant to ImageMagick will be forwarded to the executed process when set in the JVM environment.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringExecutable name to be used with theIMAGEMAGICK_EXECUTABLE_KEY_PREFIXconf key prefix.static final Stringstatic final Stringstatic final StringDeprecated, for removal: This API element is subject to removal in a future version.: since 6.1 ImageMagick in no longer embedded and has to be installed manually.static final StringExecutable name to be used with theIMAGEMAGICK_EXECUTABLE_KEY_PREFIXconf key prefix.static final StringProperty key for the binary directory to use (overrides build in mechanism).static final StringConfiguration key prefix for the executable name to use.Fields inherited from class de.hybris.platform.mediaconversion.imagemagick.BasicImageMagickStrategy
EMBEDDED_CONFIG_DIR, IMAGEMAGICK_CONFIGURATION_DIRECTORY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String[]buildEnvironment(File executable) Assembling image magick environment.voidExecutes a conversion with the specified list of options.Executes image identification with the specified options.voidsetOsConfigurationService(OsConfigurationService osDirectoryService) voidsetProcessExecutor(ProcessExecutor processExecutor) voidsetSecurityService(ImageMagickSecurityService securityService) Methods inherited from class de.hybris.platform.mediaconversion.imagemagick.BasicImageMagickStrategy
getConfigurationDirectory, getConfigurationService, getTmpDir, setConfigurationDirectory, setConfigurationService, setTmpDir
-
Field Details
-
EMBEDDED_BIN_DIR
Deprecated, for removal: This API element is subject to removal in a future version.: since 6.1 ImageMagick in no longer embedded and has to be installed manually.Default root of the binary directory (embedded and shipped with this extension). Note that below this directory there is a os.name/os.arch structure for various platforms.- See Also:
-
IMAGEMAGICK_DIR
Property key for the binary directory to use (overrides build in mechanism).- See Also:
-
IMAGEMAGICK_EXECUTABLE_KEY_PREFIX
Configuration key prefix for the executable name to use. Currently it is in use with two ImageMagick executable which are mapped/configuredf to the equal string:- imagemagick.executable.convert -> convert
- imagemagick.executable.identify -> identify
- See Also:
-
DYLD_LIBRARY_PATH
- See Also:
-
DYLD_LIBRARY_PATH_ENV
- See Also:
-
CONVERT_EXEC
Executable name to be used with theIMAGEMAGICK_EXECUTABLE_KEY_PREFIXconf key prefix. This property key is used to have an indirection if a different executable should be used.- See Also:
-
IDENTIFY_EXEC
Executable name to be used with theIMAGEMAGICK_EXECUTABLE_KEY_PREFIXconf key prefix. This property key is used to have an indirection if a different executable should be used.- See Also:
-
-
Constructor Details
-
DefaultImageMagickService
public DefaultImageMagickService()
-
-
Method Details
-
buildEnvironment
Assembling image magick environment.- Parameters:
executable- the executable to use- Returns:
- environment setting as array of 'key=value' strings
- Throws:
IOException- See Also:
-
convert
Description copied from interface:ImageMagickServiceExecutes a conversion with the specified list of options. The options available are numerous and listed on the ImageMagick command line options page.- Specified by:
convertin interfaceImageMagickService- Parameters:
commandOpts- the bold command line options (including input and output files if applicable).- Throws:
IOException- on any error
-
identify
Description copied from interface:ImageMagickServiceExecutes image identification with the specified options. Please see ImageMagick Identify Command-line Tool for usage and option descriptions.- Specified by:
identifyin interfaceImageMagickService- Parameters:
commandOptions- bold command line options to the identify command (including the input file).- Returns:
- the commands (std) output.
- Throws:
IOException- on any error.
-
getProcessExecutor
-
setProcessExecutor
-
getOsConfigurationService
-
setOsConfigurationService
-
setSecurityService
-