root/trunk/components/common/src/ome/api/IScale.java
| Revision 1167, 1.2 kB (checked in by jmoore, 2 years ago) | |
|---|---|
|
|
| Line | |
|---|---|
| 1 | /* |
| 2 | * $Id$ |
| 3 | * |
| 4 | * Copyright 2006 University of Dundee. All rights reserved. |
| 5 | * Use is subject to license terms supplied in LICENSE.txt |
| 6 | */ |
| 7 | package ome.api; |
| 8 | |
| 9 | import java.awt.image.BufferedImage; |
| 10 | |
| 11 | /** |
| 12 | * Provides methods for performing scaling (change of the image size through |
| 13 | * interpolation or other means) on BufferedImages. |
| 14 | * |
| 15 | * @author Chris Allan <a |
| 16 | * href="mailto:callan@blackcat.ca">callan@blackcat.ca</a> |
| 17 | * @version 3.0 <small> (<b>Internal version:</b> $Rev$ $Date$) </small> |
| 18 | * @since 3.0 |
| 19 | */ |
| 20 | public interface IScale extends ServiceInterface { |
| 21 | |
| 22 | /** |
| 23 | * Scales a buffered image using defined X and Y axis scale factors. For |
| 24 | * example: |
| 25 | * <p> |
| 26 | * If you wanted to take a 512x512 image and scale it to 256x256 you would |
| 27 | * use an X and Y scale factor of 0.5. |
| 28 | * </p> |
| 29 | * NOTE: The X and Y scale factors <b>do not</b> have to be equal. |
| 30 | * |
| 31 | * @param image |
| 32 | * the buffered image to scale. |
| 33 | * @param xScale |
| 34 | * X-axis scale factor. |
| 35 | * @param yScale |
| 36 | * Y-axis scale factor. |
| 37 | * @return a scaled buffered image. |
| 38 | */ |
| 39 | public BufferedImage scaleBufferedImage(BufferedImage image, float xScale, |
| 40 | float yScale); |
| 41 | } |
Note: See TracBrowser
for help on using the browser.
