public class ImageUtils extends Object
| 构造器和说明 |
|---|
ImageUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static int[] |
getImageSize(InputStream input)
获取图片大小
|
static String[] |
getImageType(InputStream img)
图片类型
|
static byte[] |
mergeHorizontal(String format,
InputStream... imgs)
横向合并图片
|
static byte[] |
mergeVertical(String format,
InputStream... imgs)
纵向合并图片
|
static byte[] |
transparent(InputStream image,
int refer,
int normal)
图片透明处理
白 rgb:-1-->255,255,255
红 rgb:-65536-->255,0,0
透明 rgb:0-->0,0,0
红 rgb:-922812416-->255,0,0
黑 rgb:-16777216-->0,0,0
黑 rgb:-939524096-->0,0,0
|
public static int[] getImageSize(InputStream input)
input - public static byte[] mergeHorizontal(String format, InputStream... imgs)
format - imgs - public static byte[] mergeVertical(String format, InputStream... imgs)
format - png,jpeg,gifimgs - public static byte[] transparent(InputStream image, int refer, int normal)
图片透明处理
白 rgb:-1-->255,255,255
红 rgb:-65536-->255,0,0
透明 rgb:0-->0,0,0
红 rgb:-922812416-->255,0,0
黑 rgb:-16777216-->0,0,0
黑 rgb:-939524096-->0,0,0
image - public static String[] getImageType(InputStream img) throws IOException
img - IOExceptionCopyright © 2023. All rights reserved.