Package ome.api.local
Interface LocalCompress
-
- All Known Implementing Classes:
CompressImpl
public interface LocalCompressProvides methods for performing scaling (change of the image size through interpolation or other means) on BufferedImages.- Since:
- 3.0
-
-
Method Summary
All Methods Instance Methods Abstract 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
void compressToStream(java.awt.image.BufferedImage image, java.io.OutputStream outputStream) throws java.io.IOExceptionCompresses 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 thepercentageis 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
-
-