public class ImageMagickHelper extends Object
Modifier and Type | Field and Description |
---|---|
static String |
MAGICK_COMPARE_ENVIRONMENT_VARIABLE
The name of the environment variable with the command to execute ImageMagic comparison operations.
|
Constructor and Description |
---|
ImageMagickHelper() |
ImageMagickHelper(String newCompareExec) |
Modifier and Type | Method and Description |
---|---|
String |
getCliExecutionCommand()
Returns a command that is used to run the utility.
|
boolean |
runImageMagickImageCompare(String outImageFilePath, String cmpImageFilePath, String diffImageName)
Runs imageMagick to visually compare images and generate difference output.
|
boolean |
runImageMagickImageCompare(String outImageFilePath, String cmpImageFilePath, String diffImageName, String fuzzValue)
Runs imageMagick to visually compare images with the specified fuzziness value and generate difference output.
|
public static final String MAGICK_COMPARE_ENVIRONMENT_VARIABLE
public ImageMagickHelper()
public ImageMagickHelper(String newCompareExec)
public String getCliExecutionCommand()
public boolean runImageMagickImageCompare(String outImageFilePath, String cmpImageFilePath, String diffImageName) throws IOException, InterruptedException
outImageFilePath
- Path to the output image file
cmpImageFilePath
- Path to the cmp image file
diffImageName
- Path to the difference output image file
IOException
- if there are file's reading/writing issues
InterruptedException
- if there is thread interruption while executing ImageMagick.
public boolean runImageMagickImageCompare(String outImageFilePath, String cmpImageFilePath, String diffImageName, String fuzzValue) throws IOException, InterruptedException
outImageFilePath
- Path to the output image file
cmpImageFilePath
- Path to the cmp image file
diffImageName
- Path to the difference output image file
fuzzValue
- String fuzziness value to compare images. Should be formatted as string with integer or decimal number. Can be null, if it is not required to use fuzziness
IOException
- if there are file's reading/writing issues
InterruptedException
- if there is thread interruption while executing ImageMagick.
Copyright © 1998–2020 iText Group NV. All rights reserved.