public class Watermark extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_SIZE |
static double |
ROTATE |
static String |
WATER_MARK |
| Constructor and Description |
|---|
Watermark() |
| Modifier and Type | Method and Description |
|---|---|
BufferedImage |
exec(InputStream photo)
Create a default #WATER_MARK with equal scaling (one of the length and width does not exceed #MAX_SIZE)
and no landscape rotation by default.
|
static BufferedImage |
exec(InputStream photo,
boolean landscape)
Create a default #WATER_MARK with equal scaling (one of the length and width does not exceed #MAX_SIZE)
Horizontal (landscape), will rotate the vertical board 90 degrees clockwise.
|
static BufferedImage |
exec(InputStream photo,
InputStream watermark,
int maxSize,
boolean landscape)
Create a specified watermark with equal scaling (one of the length and width does not exceed maxSize)
Horizontal (landscape), will rotate the vertical board 90 degrees clockwise.
|
static BufferedImage |
exec(InputStream photo,
int maxSize,
boolean landscape)
Create a default #WATER_MARK with equal scaling (one of the length and width does not exceed maxSize)
Horizontal (landscape), will rotate the vertical board 90 degrees clockwise.
|
static BufferedImage |
exec(String photo)
Create a default #WATER_MARK with equal scaling (one of the length and width does not exceed #MAX_SIZE)
and no landscape rotation by default.
|
static BufferedImage |
exec(String photo,
boolean landscape)
Create a default #WATER_MARK with equal scaling (one of the length and width does not exceed #MAX_SIZE)
Horizontal (landscape), will rotate the vertical board 90 degrees clockwise.
|
static BufferedImage |
exec(String photo,
int maxSize,
boolean landscape)
Create a default #WATER_MARK with equal scaling (one of the length and width does not exceed maxSize)
Horizontal (landscape), will rotate the vertical board 90 degrees clockwise.
|
public static final String WATER_MARK
public static final int MAX_SIZE
public static final double ROTATE
public static BufferedImage exec(String photo) throws IOException
IOExceptionpublic BufferedImage exec(InputStream photo) throws IOException
IOExceptionpublic static BufferedImage exec(String photo, boolean landscape) throws IOException
IOExceptionpublic static BufferedImage exec(String photo, int maxSize, boolean landscape) throws IOException
IOExceptionpublic static BufferedImage exec(InputStream photo, boolean landscape) throws IOException
IOExceptionpublic static BufferedImage exec(InputStream photo, int maxSize, boolean landscape) throws IOException
IOExceptionpublic static BufferedImage exec(InputStream photo, InputStream watermark, int maxSize, boolean landscape) throws IOException
IOExceptionCopyright © 2023. All rights reserved.