
이미지 파일을 파라미터로 받아 destination(저장할 폴더의 디렉터리)에 압축된 이미지를 저장하는 소스입니다. public static void compressImage(File imageFile, String destination) throws Exception { File compressedImageFile = new File(destination + imageFile.getName()); InputStream is = new FileInputStream(imageFile); OutputStream os = new FileOutputStream(compressedImageFile); float quality = 0.5f; BufferedImage image = ImageIO.read(is); I..
Server
2021. 1. 21. 17:43
공지사항