|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.stanford.hci.r3.util.graphics.JAIUtils
public class JAIUtils
This software is distributed under the BSD License.
Constructor Summary | |
---|---|
JAIUtils()
|
Method Summary | |
---|---|
static TiledImage |
createWritableBuffer(int width,
int height)
Creates an alpha channel to write translucent images to. |
static TiledImage |
createWritableBufferWithoutAlpha(int width,
int height)
Even without an alpha channel, you can do alpha compositing! However, it won't work well if you want a transparent background for PNGs. |
static PlanarImage |
createZeroImage(int width,
int height,
int numBands)
Create a black image with the given width, height, and color depth (use 3 for an RGB image, 4 for RGBA). |
static PlanarImage |
readJPEG(java.io.File jpegFile)
|
static PlanarImage |
scaleImage(PlanarImage src,
InterpolationQuality interpQuality,
float scaleFactorX,
float scaleFactorY)
performs a JAI scaling of the PlanarImage with appropriate scale factors |
static PlanarImage |
scaleImageIteratively(PlanarImage src,
float scaleFactorX,
float scaleFactorY)
|
static PlanarImage |
scaleImageIteratively(PlanarImage src,
InterpolationQuality interpQuality,
float scaleFactorX,
float scaleFactorY)
Higher quality, but slower implementation... |
static PlanarImage |
scaleImageToFit(PlanarImage src,
int width,
int height)
scale the image to best fit into a rectangle of size width x height defaults to good (but slower) scaling |
static PlanarImage |
scaleImageToSize(PlanarImage src,
int targetWidth,
int targetHeight,
InterpolationQuality quality,
boolean maintainAspectRatio)
the targets are hints... |
static void |
writeImageToJPEG(PlanarImage img,
java.io.File path)
Writes a PlanarImage to a file, specified by the String (absolute path) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JAIUtils()
Method Detail |
---|
public static TiledImage createWritableBuffer(int width, int height)
width
- height
-
public static TiledImage createWritableBufferWithoutAlpha(int width, int height)
width
- height
-
public static PlanarImage createZeroImage(int width, int height, int numBands)
width
- height
- numBands
-
public static PlanarImage readJPEG(java.io.File jpegFile)
jpegFile
-
public static PlanarImage scaleImage(PlanarImage src, InterpolationQuality interpQuality, float scaleFactorX, float scaleFactorY)
src
- interpQuality
- scaleFactorX
- scaleFactorY
-
public static PlanarImage scaleImageIteratively(PlanarImage src, float scaleFactorX, float scaleFactorY)
public static PlanarImage scaleImageIteratively(PlanarImage src, InterpolationQuality interpQuality, float scaleFactorX, float scaleFactorY)
src
- interpQuality
- scaleFactorX
- scaleFactorY
-
public static PlanarImage scaleImageToFit(PlanarImage src, int width, int height)
src
- width
- height
-
public static PlanarImage scaleImageToSize(PlanarImage src, int targetWidth, int targetHeight, InterpolationQuality quality, boolean maintainAspectRatio)
src
- targetWidth
- targetHeight
- quality
- maintainAspectRatio
-
public static void writeImageToJPEG(PlanarImage img, java.io.File path)
img
- quality
- [0 to 100]path
-
|
Copyright 2006 Stanford University | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |