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 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.
-
-
-
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 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:LocalCompress
Sets the current compression level for the service. (The default is 85%)- Specified by:
setCompressionLevel
in interfaceLocalCompress
- 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 interfaceLocalCompress
- Returns:
- the current compression level
-
-