public class ImageHandler extends FileHandler
BOTTOM, BOTTOM_CENTER, CENTER, DEFAULT_COLOR, DEFAULT_FONT, MIDDLE, MIDDLE_CENTER
Constructor and Description |
---|
ImageHandler() |
Modifier and Type | Method and Description |
---|---|
protected void |
addText(InputStream inputStream,
OutputStream outputStream,
String text,
String color,
Integer fontSize,
String position,
int pos) |
protected void |
addText(String imagePath,
String text,
String color,
Integer fontSize,
String position,
int pos) |
void |
resize(String imagePath,
int width)
Resize image with desired width
On resize image ration is kept |
void |
resize(String originalImagePath,
String newImagePath,
int width)
Resize image with desired width and store it in new location
|
addCaption, addCaption, addEvaluationMessage, addEvaluationMessage, addWatermark, addWatermark
public void resize(String imagePath, int width) throws Exception
imagePath
- Path to image filewidth
- New widthException
public void resize(String originalImagePath, String newImagePath, int width) throws Exception
originalImagePath
- Path to original imagenewImagePath
- Path to new image locationwidth
- New widthException
protected void addText(InputStream inputStream, OutputStream outputStream, String text, String color, Integer fontSize, String position, int pos)
addText
in class FileHandler
Copyright © 2014. All rights reserved.