public class ImageUtils extends Object
| 构造器和说明 |
|---|
ImageUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
emf2Png(byte[] in,
File outPngFile,
int width)
emf转换为png图片格式
|
static void |
emf2Png(InputStream is,
File outPngFile,
int width)
emf转换为png图片格式
|
static void |
emf2PngStream(InputStream is,
OutputStream outPngStream,
int width)
emf转换为png图片格式
|
static void |
svgToPng(File svgFile,
File outPngFile,
int width)
svg文件转换为png文件。
|
static void |
svgToPngStream(InputStream svgInputStream,
OutputStream pngOutStream,
int width)
svg数据流转换为png数据流。
|
static void |
wmf2Png(byte[] in,
File outPngFile,
int width)
wmf转换为png图片格式
|
static void |
wmf2Png(InputStream is,
File outPngFile,
int width)
wmf转换为png图片格式
|
static void |
wmf2PngStream(InputStream is,
OutputStream pngOutStream,
int width)
wmf转换为png,输出为流
|
static void |
wmfToSvg(InputStream in,
File dest)
将wmf转换为svg
|
static void |
wmfToSvgStream(InputStream in,
OutputStream svgOutStream,
boolean isCompress)
将wmf输入流转换为svg输出流
|
public static void emf2PngStream(InputStream is, OutputStream outPngStream, int width) throws IOException
is - emf输入流outPngStream - 要输出的目标png数据流width - 目标输出宽度,像素单位IOExceptionpublic static void emf2Png(InputStream is, File outPngFile, int width) throws IOException
is - emf输入流outPngFile - 要输出的目标png图片width - 目标输出宽度,像素单位IOExceptionpublic static void emf2Png(byte[] in,
File outPngFile,
int width)
throws IOException
in - emf字节数组outPngFile - 要输出的目标png图片IOExceptionpublic static void wmf2PngStream(InputStream is, OutputStream pngOutStream, int width) throws Exception
is - wmf输入流pngOutStream - 要向其中写入转换后png图片的目标数据流width - 希望输出的图片宽度,像素Exception - 转换失败public static void wmf2Png(InputStream is, File outPngFile, int width) throws Exception
is - wmf输入流outPngFile - 要输出的目标png图片width - 希望输出的图片宽度,像素Exceptionpublic static void wmf2Png(byte[] in,
File outPngFile,
int width)
throws Exception
in - wmf字节数组outPngFile - 要输出的目标png图片width - 希望输出的图片宽度,像素Exceptionpublic static void wmfToSvg(InputStream in, File dest) throws Exception
in - wmf字节流dest - 要输出的svg文件名Exceptionpublic static void wmfToSvgStream(InputStream in, OutputStream svgOutStream, boolean isCompress) throws Exception
in - wmf字节流svgOutStream - 要输出的svg字节流isCompress - 是否要转换成.svgz,压缩格式的svgExceptionpublic static void svgToPng(File svgFile, File outPngFile, int width) throws Exception
svgFile - 源svg文件outPngFile - 输出目标png文件路径width - 转换目标宽度Exceptionpublic static void svgToPngStream(InputStream svgInputStream, OutputStream pngOutStream, int width) throws Exception
svgInputStream - 源svg二进制数据流pngOutStream - 要写入的输出数据流width - 转换目标宽度ExceptionCopyright © 2019. All rights reserved.