public class SitePreviewTools extends Object
| Constructor and Description |
|---|
SitePreviewTools() |
| Modifier and Type | Method and Description |
|---|---|
static String |
generatePreview(String url,
String cutyCaptExecutable,
String workingDir,
int width,
long timeout) |
static Image |
generatePreviewImage(String url,
String cutyCaptExecutable,
String workingDir,
int width,
long timeout)
Generates a screenshot from a website
|
static BufferedImage |
scaleToWidth(BufferedImage image,
int width) |
public static Image generatePreviewImage(String url, String cutyCaptExecutable, String workingDir, int width, long timeout)
url - the website's urlcutyCaptExecutable - the command line executable which is used to generate the preview, must be invokable in the syntax
"captureExecutable URL OUTPUTFILE"workingDir - the working directory for the temporary filestimeout - the amount of milliseconds to wait for the external processpublic static String generatePreview(String url, String cutyCaptExecutable, String workingDir, int width, long timeout)
public static BufferedImage scaleToWidth(BufferedImage image, int width)
Copyright © 2017 SAP SE. All Rights Reserved.