Package ome.logic
Class CompressImpl
- java.lang.Object
-
- ome.logic.CompressImpl
-
- All Implemented Interfaces:
LocalCompress
public class CompressImpl extends java.lang.Object implements LocalCompress
-
-
Constructor Summary
Constructors Constructor Description CompressImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcompressToStream(java.awt.image.BufferedImage image, java.io.OutputStream outputStream)Compresses a buffered image to an output stream.floatgetCompressionLevel()Returns the current compression level for the service.voidsetCompressionLevel(float percentage)Sets the current compression level for the service.
-
-
-
Method Detail
-
compressToStream
public void compressToStream(java.awt.image.BufferedImage image, java.io.OutputStream outputStream) throws java.io.IOExceptionDescription copied from interface:LocalCompressCompresses a buffered image to an output stream.- Specified by:
compressToStreamin interfaceLocalCompress- 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:LocalCompressSets the current compression level for the service. (The default is 85%)- Specified by:
setCompressionLevelin interfaceLocalCompress- Parameters:
percentage- A percentage compression level from 1.00 (100%) to 0.01 (1%).
-
getCompressionLevel
public float getCompressionLevel()
Description copied from interface:LocalCompressReturns the current compression level for the service.- Specified by:
getCompressionLevelin interfaceLocalCompress- Returns:
- the current compression level
-
-