Class ImageMagickCommand
java.lang.Object
org.onehippo.forge.gallerymagick.core.command.AbstractMagickCommand
org.onehippo.forge.gallerymagick.core.command.ImageMagickCommand
Encapsulation of Image Magick Command Utilities.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
System property name for Image Magick command executable, convert.static final String
System property name for Image Magick command executable, identify.Fields inherited from class org.onehippo.forge.gallerymagick.core.command.AbstractMagickCommand
DEFAULT_SUBCOMMAND_CONVERT, PROP_TIMEOUT
-
Constructor Summary
ConstructorDescriptionImageMagickCommand
(String executable, String subCommand) Constructor with anexecutable
and asubCommand
. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.commons.exec.CommandLine
Create aCommandLine
from executable and arguments.Methods inherited from class org.onehippo.forge.gallerymagick.core.command.AbstractMagickCommand
addArgument, clearArguments, execute, execute, getArguments, getExecutable, getSubCommand, getWorkingDirectory, setWorkingDirectory
-
Field Details
-
PROP_EXECUTABLE_CONVERT
System property name for Image Magick command executable, convert.- See Also:
-
PROP_EXECUTABLE_IDENTIFY
System property name for Image Magick command executable, identify.- See Also:
-
-
Constructor Details
-
ImageMagickCommand
Constructor with anexecutable
and asubCommand
. Ifexecutable
is null, it tries to find it from a system property keyed byPROP_EXECUTABLE_CONVERT
. If not found from the system property, it uses the default Image Magick convert command executable,AbstractMagickCommand.DEFAULT_SUBCOMMAND_CONVERT
.- Parameters:
executable
- (optional) executable of ImageMagick commandsubCommand
- sub-command
-
-
Method Details
-
createCommandLine
protected org.apache.commons.exec.CommandLine createCommandLine()Create aCommandLine
from executable and arguments.- Specified by:
createCommandLine
in classAbstractMagickCommand
- Returns:
- a
CommandLine
from executable and arguments
-