Hi, i'am trying to use the lib to automaticaly convert jpg files to webp to obtain smaller files. My problem is that the output file is the same weight even if it smaller in size (I previously resized the picture).
I'am doing this under Windows system with this code :
ImageWriter writer = ImageIO.getImageWritersByMIMEType("image/webp").next();
WebPWriteParam writeParam = new WebPWriteParam(writer.getLocale());
writeParam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
writeParam.setCompressionType(writeParam.getCompressionTypes()[WebPWriteParam.LOSSLESS_COMPRESSION]);
writer.setOutput(new FileImageOutputStream(outputFile));
writer.write(null, new IIOImage(bufferedImage, null, null), writeParam);
Hi, i'am trying to use the lib to automaticaly convert jpg files to webp to obtain smaller files. My problem is that the output file is the same weight even if it smaller in size (I previously resized the picture).
I'am doing this under Windows system with this code :