2015-03-07

Read WebP images in Java


Read WebP images in Java
There is an open source package for WebP decoding. It can be used to read a WebP image with Java ImageIO. Unfortunately there is no encoder in this package, so we can not create a WebP image.

Download Webp Java Decoder WebPViewer-0.2.jar here.
http://sourceforge.net/projects/javavp8decoder/files/

Before using this Jar file, you should create a file named javax.imageio.spi.ImageReaderSpi under META-INF/services. There is only one line in this file:

net.sf.javavp8decoder.imageio.WebPImageReaderSpi

Put this file into the Jar file under the directory META-INF/services. Put the Jar file in the CLASSPATH. Then done!

ImageIO will load the Reader automatically. The file extension name of WebP image is .webp.

Labels: , ,

0 Comments:

Post a Comment

<< Home