public class ImageWatermarkKit extends Object
| 构造器和说明 |
|---|
ImageWatermarkKit() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
strToImage(String outImgPath,
Color fontColor,
int fontSize,
String fontName,
int imgWidth,
int imgHeight,
String waterMarkContent)
文件转图片
|
static void |
waterPress(String srcImgPath,
String outImgPath,
Color markContentColor,
int fontSize,
String waterMarkContent,
String fontName)
图片添加水印
|
public static void strToImage(String outImgPath, Color fontColor, int fontSize, String fontName, int imgWidth, int imgHeight, String waterMarkContent) throws IOException
outImgPath - 添加水印后图片输出路径fontColor - 水印文字的颜色fontSize - 文字大小fontName - 字体名称imgWidth - 图片高度imgHeight - 图片宽度waterMarkContent - 水印的文字IOExceptionpublic static void waterPress(String srcImgPath, String outImgPath, Color markContentColor, int fontSize, String waterMarkContent, String fontName) throws IOException
srcImgPath - 需要添加水印的图片的路径outImgPath - 添加水印后图片输出路径markContentColor - 水印文字的颜色fontSize - 文字大小waterMarkContent - 水印的文字fontName - 字体名称IOExceptionCopyright © 2019. All rights reserved.