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.

        Specified by:
        read in interface com.idrsolutions.image.Decoder
        Parameters:
        rawData - byte[] array containing the WEBP data
        Returns:
        BufferedImage The decoded image
        Throws:
        Exception