Class WebpUtil


  • public class WebpUtil
    extends java.lang.Object
    Webp image utilities.
    Since:
    16.0.0
    Version:
    $Revision: 25808 $ $Date: 2023-07-04 15:20:55 -0300 (Tue, 04 Jul 2023) $
    • Constructor Summary

      Constructors 
      Constructor Description
      WebpUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void transformImage​(java.io.InputStream srcImg, java.io.OutputStream trgImg, java.lang.Integer width, java.lang.Integer height)
      Converts the source image stream into the given output stream (converting it to webp) and scales the image based on the given width or height (only one of them is expected to be non-null).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WebpUtil

        public WebpUtil()
    • Method Detail

      • transformImage

        public static void transformImage​(java.io.InputStream srcImg,
                                          java.io.OutputStream trgImg,
                                          java.lang.Integer width,
                                          java.lang.Integer height)
        Converts the source image stream into the given output stream (converting it to webp) and scales the image based on the given width or height (only one of them is expected to be non-null).
        Parameters:
        srcImg - the source image stream
        trgImg - the target image stream
        width - the width
        height - the height
        Since:
        16.0.0