ome.logic
Class CompressImpl

java.lang.Object
  extended by ome.logic.CompressImpl
All Implemented Interfaces:
LocalCompress

public class CompressImpl
extends Object
implements LocalCompress


Constructor Summary
CompressImpl()
           
 
Method Summary
 void compressToStream(BufferedImage image, 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(BufferedImage image,
                             OutputStream outputStream)
                      throws 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:
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


OmeroJava Api

Version: Beta-4.2.0-r7571-b29

Copyright © 2009 The University of Dundee. All Rights Reserved.