public class SitePreviewTools
extends java.lang.Object
| Constructor and Description |
|---|
SitePreviewTools() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
generatePreview(java.lang.String url,
java.lang.String cutyCaptExecutable,
java.lang.String workingDir,
int width,
long timeout) |
static Image |
generatePreviewImage(java.lang.String url,
java.lang.String cutyCaptExecutable,
java.lang.String workingDir,
int width,
long timeout)
Generates a screenshot from a website
|
static java.awt.image.BufferedImage |
scaleToWidth(java.awt.image.BufferedImage image,
int width) |
public static Image generatePreviewImage(java.lang.String url,
java.lang.String cutyCaptExecutable,
java.lang.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 java.lang.String generatePreview(java.lang.String url,
java.lang.String cutyCaptExecutable,
java.lang.String workingDir,
int width,
long timeout)
public static java.awt.image.BufferedImage scaleToWidth(java.awt.image.BufferedImage image,
int width)
Copyright © 2018 SAP SE. All Rights Reserved.