Class WebpUtil


  • public class WebpUtil
    extends java.lang.Object
    Webp image utilities.
    Since:
    16.0.0
    Version:
    $Revision: 26440 $ $Date: 2024-06-12 15:03:54 -0300 (Wed, 12 Jun 2024) $
    • 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