public class DefaultImageMagickService extends BasicImageMagickStrategy implements ImageMagickService
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.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CONVERT_EXEC
Executable name to be used with the
IMAGEMAGICK_EXECUTABLE_KEY_PREFIX conf key prefix. |
static java.lang.String |
DYLD_LIBRARY_PATH |
static java.lang.String |
DYLD_LIBRARY_PATH_ENV |
static java.lang.String |
EMBEDDED_BIN_DIR
Deprecated.
: since 6.1 ImageMagick in no longer embedded and has to be installed manually.
|
static java.lang.String |
IDENTIFY_EXEC
Executable name to be used with the
IMAGEMAGICK_EXECUTABLE_KEY_PREFIX conf key prefix. |
static java.lang.String |
IMAGEMAGICK_DIR
Property key for the binary directory to use (overrides build in mechanism).
|
static java.lang.String |
IMAGEMAGICK_EXECUTABLE_KEY_PREFIX
Configuration key prefix for the executable name to use.
|
EMBEDDED_CONFIG_DIR, IMAGEMAGICK_CONFIGURATION_DIRECTORY| Constructor and Description |
|---|
DefaultImageMagickService() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String[] |
buildEnvironment(java.io.File executable)
Assembling image magick environment.
|
void |
convert(java.util.List<java.lang.String> commandOpts)
Executes a conversion with the specified list of options.
|
OsConfigurationService |
getOsConfigurationService() |
ProcessExecutor |
getProcessExecutor() |
java.lang.String |
identify(java.util.List<java.lang.String> commandOptions)
Executes image identification with the specified options.
|
void |
setOsConfigurationService(OsConfigurationService osDirectoryService) |
void |
setProcessExecutor(ProcessExecutor processExecutor) |
getConfigurationDirectory, getConfigurationService, getTmpDir, setConfigurationDirectory, setConfigurationService, setTmpDir@Deprecated public static final java.lang.String EMBEDDED_BIN_DIR
public static final java.lang.String IMAGEMAGICK_DIR
public static final java.lang.String IMAGEMAGICK_EXECUTABLE_KEY_PREFIX
CONVERT_EXEC,
IDENTIFY_EXEC,
Constant Field Valuespublic static final java.lang.String DYLD_LIBRARY_PATH
public static final java.lang.String DYLD_LIBRARY_PATH_ENV
public static final java.lang.String CONVERT_EXEC
IMAGEMAGICK_EXECUTABLE_KEY_PREFIX conf key prefix. This property key
is used to have an indirection if a different executable should be used.public static final java.lang.String IDENTIFY_EXEC
IMAGEMAGICK_EXECUTABLE_KEY_PREFIX conf key prefix. This property key
is used to have an indirection if a different executable should be used.protected java.lang.String[] buildEnvironment(java.io.File executable)
throws java.io.IOException
executable - the executable to usejava.io.IOExceptionpublic void convert(java.util.List<java.lang.String> commandOpts)
throws java.io.IOException
ImageMagickServiceconvert in interface ImageMagickServicecommandOpts - the bold command line options (including input and output files if applicable).java.io.IOException - on any errorpublic java.lang.String identify(java.util.List<java.lang.String> commandOptions)
throws java.io.IOException
ImageMagickServiceidentify in interface ImageMagickServicecommandOptions - bold command line options to the identify command (including the input file).java.io.IOException - on any error.public ProcessExecutor getProcessExecutor()
public void setProcessExecutor(ProcessExecutor processExecutor)
public OsConfigurationService getOsConfigurationService()
public void setOsConfigurationService(OsConfigurationService osDirectoryService)
Copyright © 2018 SAP SE. All Rights Reserved.