ome.logic
Class JavaImageScalingService

java.lang.Object
  extended by ome.logic.JavaImageScalingService
All Implemented Interfaces:
IScale, ServiceInterface

public class JavaImageScalingService
extends Object
implements IScale

Provides methods for scaling buffered images using Java Image Scaling.

Author:
Chris Allan      callan@blackcat.ca

Constructor Summary
JavaImageScalingService()
           
 
Method Summary
 BufferedImage scaleBufferedImage(BufferedImage image, float xScale, float yScale)
          Scales a buffered image using defined X and Y axis scale factors.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaImageScalingService

public JavaImageScalingService()
Method Detail

scaleBufferedImage

public BufferedImage scaleBufferedImage(BufferedImage image,
                                        float xScale,
                                        float yScale)
Description copied from interface: IScale
Scales a buffered image using defined X and Y axis scale factors. For example:

If you wanted to take a 512x512 image and scale it to 256x256 you would use an X and Y scale factor of 0.5.

NOTE: The X and Y scale factors do not have to be equal.

Specified by:
scaleBufferedImage in interface IScale
Parameters:
image - the buffered image to scale.
xScale - X-axis scale factor.
yScale - Y-axis scale factor.
Returns:
a scaled buffered image.


OmeroJava Api

Version: Beta4.2.1-r8614-Beta4.2-b41

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