Class WebpDecoder

  • All Implemented Interfaces:
    com.idrsolutions.image.Decoder

    public class WebpDecoder
    extends com.idrsolutions.image.JDeliImage
    implements com.idrsolutions.image.Decoder
    Class reads lossy WEBP images as BufferedImage // Make NO assumptions about type of BufferedImage type returned (may change)

    Example:

    
     WebpDecoder decoder = new WebpDecoder();
     BufferedImage decodedImage = decoder.read(webpByteData);
     
    • Constructor Detail

      • WebpDecoder

        public WebpDecoder()
    • Method Detail

      • read

        public BufferedImage read​(byte[] rawData)
                           throws Exception
        Make NO assumptions about type of BufferedImage type returned (may change)

        Decodes and returns the WEBP image as a BufferedImage.

        Parameters:
        rawData - byte[] array containing the WEBP data
        Returns:
        BufferedImage The decoded image
        Throws:
        Exception