ome.logic
Class AWTScaleService

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

public class AWTScaleService
extends Object
implements IScale

Provides methods for scaling buffered images.

Since:
3.0
Version:
3.0 (Internal version: $Rev$ $Date$)
Author:
Chris Allan      callan@blackcat.ca

Constructor Summary
AWTScaleService()
           
 
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

AWTScaleService

public AWTScaleService()
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: 4.3.3-00d1137e-b2894

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