How to achieve jpeg-lossess in Java?
ImageWriter writer = (ImageWriter) ImageIO.getImageWritersByFormatName(\"JPEG-LS\").next();
ImageWriteParam param = writ
The first code snippet has a typo:
param.setCompressionType("JPEG-lS");
It has to be
param.setCompressionType("JPEG-LS");
(all upper case). I think it is otherwise correct and should work.
To query possible types, use param.getCompressionTypes()
(as noted in a comment).
Standard java does not have a compression type for JPEG-LS.
You can to download and use the JAI (Java Advanced Imaging) API though which I beleive includes such a compression type.
Can be downloaded from here