Package ome.logic

Class CompressImpl

    • Constructor Summary

      Constructors 
      Constructor Description
      CompressImpl()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void compressToStream​(java.awt.image.BufferedImage image, java.io.OutputStream outputStream)
      Compresses a buffered image to an output stream.
      float getCompressionLevel()
      Returns the current compression level for the service.
      void setCompressionLevel​(float percentage)
      Sets the current compression level for the service.
      • Methods inherited from class java.lang.Object

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

      • CompressImpl

        public CompressImpl()
    • Method Detail

      • compressToStream

        public void compressToStream​(java.awt.image.BufferedImage image,
                                     java.io.OutputStream outputStream)
                              throws java.io.IOException
        Description copied from interface: LocalCompress
        Compresses a buffered image to an output stream.
        Specified by:
        compressToStream in interface LocalCompress
        Parameters:
        image - the thumbnail's buffered image.
        outputStream - the stream to write to.
        Throws:
        java.io.IOException - if there is a problem when writing to stream.
      • setCompressionLevel

        public void setCompressionLevel​(float percentage)
        Description copied from interface: LocalCompress
        Sets the current compression level for the service. (The default is 85%)
        Specified by:
        setCompressionLevel in interface LocalCompress
        Parameters:
        percentage - A percentage compression level from 1.00 (100%) to 0.01 (1%).
      • getCompressionLevel

        public float getCompressionLevel()
        Description copied from interface: LocalCompress
        Returns the current compression level for the service.
        Specified by:
        getCompressionLevel in interface LocalCompress
        Returns:
        the current compression level