文件名称:蓝牙打印声色版(联系我)
文件大小:3.73MB
文件格式:RAR
更新时间:2018-07-11 15:51:57
阵前
/* tif转换到jpg格式 */ String input2 = "d:/img/a.tif"; String output2 = "d:/img/a.jpg"; RenderedOp src2 = JAI.create("fileload", input2); OutputStream os2 = new FileOutputStream(output2); JPEGEncodeParam param2 = new JPEGEncodeParam(); //指定格式类型,jpg 属于 JPEG 类型 ImageEncoder enc2 = ImageCodec.createImageEncoder("JPEG", os2, param2); enc2.encode(src2); os2.close(); /*tif转换到bmp格式*/ String inputFile = "d:/img/b.tif"; String outputFile = "d:/img/b.bmp"; RenderedOp src = JAI.create("fileload", inputFile); OutputStream os = new FileOutputStream(outputFile); BMPEncodeParam param = new BMPEncodeParam(); ImageEncoder enc = ImageCodec.createImageEncoder("BMP", os,param); enc.encode(src); os.close();//关闭流