Package ome.api.local

Interface LocalCompress

  • All Known Implementing Classes:
    CompressImpl

    public interface LocalCompress
    Provides methods for performing scaling (change of the image size through interpolation or other means) on BufferedImages.
    Since:
    3.0
    • Method Detail

      • compressToStream

        void compressToStream​(java.awt.image.BufferedImage image,
                              java.io.OutputStream outputStream)
                       throws java.io.IOException
        Compresses a buffered image to an output stream.
        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

        void setCompressionLevel​(float percentage)
        Sets the current compression level for the service. (The default is 85%)
        Parameters:
        percentage - A percentage compression level from 1.00 (100%) to 0.01 (1%).
        Throws:
        ome.conditions.ValidationException - if the percentage is out of range. (actually doesn't but might should)
      • getCompressionLevel

        float getCompressionLevel()
        Returns the current compression level for the service.
        Returns:
        the current compression level