|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Image
java.awt.image.BufferedImage
org.jagatoo.image.DirectBufferedImage
public class DirectBufferedImage
This is a BufferedImage extension, that uses a DataBuffer, that stores its
data directly in a ByteBuffer.
This allows for minimum memory usage, since no data is stored more than once.
Nested Class Summary | |
---|---|
static class |
DirectBufferedImage.Type
|
Field Summary |
---|
Fields inherited from class java.awt.image.BufferedImage |
---|
TYPE_3BYTE_BGR, TYPE_4BYTE_ABGR, TYPE_4BYTE_ABGR_PRE, TYPE_BYTE_BINARY, TYPE_BYTE_GRAY, TYPE_BYTE_INDEXED, TYPE_CUSTOM, TYPE_INT_ARGB, TYPE_INT_ARGB_PRE, TYPE_INT_BGR, TYPE_INT_RGB, TYPE_USHORT_555_RGB, TYPE_USHORT_565_RGB, TYPE_USHORT_GRAY |
Fields inherited from class java.awt.Image |
---|
accelerationPriority, SCALE_AREA_AVERAGING, SCALE_DEFAULT, SCALE_FAST, SCALE_REPLICATE, SCALE_SMOOTH, UndefinedProperty |
Fields inherited from interface java.awt.Transparency |
---|
BITMASK, OPAQUE, TRANSLUCENT |
Method Summary | |
---|---|
java.nio.ByteBuffer |
getByteBuffer()
|
DirectBufferedImage.Type |
getDirectType()
|
int |
getNumBytes()
|
static DirectBufferedImage |
loadDirectImage(java.io.File file)
reads in an image using image io. |
static DirectBufferedImage |
loadDirectImage(java.io.File file,
boolean allowAlpha)
reads in an image using image io. |
static DirectBufferedImage |
loadDirectImage(java.io.InputStream in)
reads in an image using image io. |
static DirectBufferedImage |
loadDirectImage(java.io.InputStream in,
boolean allowAlpha)
reads in an image using image io. |
static DirectBufferedImage |
loadDirectImage(java.lang.String name)
|
static DirectBufferedImage |
loadDirectImage(java.lang.String name,
boolean allowAlpha)
reads in an image using image io. |
static java.awt.image.BufferedImage |
loadDirectImage(java.net.URL url)
|
static DirectBufferedImage |
loadDirectImage(java.net.URL url,
boolean allowAlpha)
reads in an image using image io. |
static DirectBufferedImage |
make(java.awt.image.BufferedImage bi)
|
static DirectBufferedImage |
make(java.awt.image.BufferedImage bi,
boolean allowAlpha)
|
static DirectBufferedImage |
make(DirectBufferedImage.Type type,
int width,
int height)
|
static DirectBufferedImage |
makeDirectImageOneByte(int width,
int height)
|
static DirectBufferedImage |
makeDirectImageRGB(java.awt.image.BufferedImage source)
Takes the source buffered image and converts it to a buffered image which is backed by a direct byte buffer |
static DirectBufferedImage |
makeDirectImageRGB(int width,
int height)
Creates a buffered image which is backed by a NIO byte buffer |
static DirectBufferedImage |
makeDirectImageRGB(int width,
int height,
int pixelSize)
Creates a buffered image which is backed by a NIO byte buffer |
static DirectBufferedImage |
makeDirectImageRGB(int width,
int height,
int[] bandOffsets,
java.nio.ByteBuffer bb)
Creates a buffered image which is backed by a NIO byte buffer |
static DirectBufferedImage |
makeDirectImageRGBA(java.awt.image.BufferedImage source)
takes the source buffered image and converts it to a buffered image which is backed by a direct byte buffer |
static DirectBufferedImage |
makeDirectImageRGBA(int width,
int height)
Creates a buffered image which is backed by a NIO byte buffer |
static DirectBufferedImage |
makeDirectImageRGBA(int width,
int height,
int pixelSize)
Creates a buffered image which is backed by a NIO byte buffer |
static DirectBufferedImage |
makeDirectImageRGBA(int width,
int height,
int[] bandOffsets,
java.nio.ByteBuffer bb)
Creates a buffered image which is backed by a NIO byte buffer |
static DirectBufferedImage |
makeDirectImageTwoBytes(int width,
int height)
Creates a buffered image which is backed by a NIO byte buffer |
static DirectBufferedImage |
makeDirectImageTwoBytes(int width,
int height,
int pixelSize)
|
Methods inherited from class java.awt.image.BufferedImage |
---|
addTileObserver, coerceData, copyData, createGraphics, getAlphaRaster, getColorModel, getData, getData, getGraphics, getHeight, getHeight, getMinTileX, getMinTileY, getMinX, getMinY, getNumXTiles, getNumYTiles, getProperty, getProperty, getPropertyNames, getRaster, getRGB, getRGB, getSampleModel, getSource, getSources, getSubimage, getTile, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, getTransparency, getType, getWidth, getWidth, getWritableTile, getWritableTileIndices, hasTileWriters, isAlphaPremultiplied, isTileWritable, releaseWritableTile, removeTileObserver, setData, setRGB, setRGB, toString |
Methods inherited from class java.awt.Image |
---|
flush, getAccelerationPriority, getCapabilities, getScaledInstance, setAccelerationPriority |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public final DirectBufferedImage.Type getDirectType()
public final int getNumBytes()
public final java.nio.ByteBuffer getByteBuffer()
public static DirectBufferedImage makeDirectImageRGBA(int width, int height, int[] bandOffsets, java.nio.ByteBuffer bb)
width
- height
- bandOffsets
- bb
-
public static DirectBufferedImage makeDirectImageRGBA(int width, int height, int pixelSize)
width
- height
- pixelSize
-
public static DirectBufferedImage makeDirectImageRGBA(int width, int height)
width
- height
-
public static DirectBufferedImage makeDirectImageRGB(int width, int height, int[] bandOffsets, java.nio.ByteBuffer bb)
width
- height
- bandOffsets
- bb
-
public static DirectBufferedImage makeDirectImageRGB(int width, int height, int pixelSize)
width
- height
- pixelSize
-
public static DirectBufferedImage makeDirectImageRGB(int width, int height)
width
- height
-
public static DirectBufferedImage makeDirectImageRGB(java.awt.image.BufferedImage source)
source
-
public static DirectBufferedImage makeDirectImageTwoBytes(int width, int height, int pixelSize)
public static DirectBufferedImage makeDirectImageTwoBytes(int width, int height)
width
- height
-
public static DirectBufferedImage makeDirectImageOneByte(int width, int height)
public static DirectBufferedImage makeDirectImageRGBA(java.awt.image.BufferedImage source)
source
-
public static DirectBufferedImage make(DirectBufferedImage.Type type, int width, int height)
public static DirectBufferedImage make(java.awt.image.BufferedImage bi, boolean allowAlpha)
public static DirectBufferedImage make(java.awt.image.BufferedImage bi)
public static DirectBufferedImage loadDirectImage(java.io.InputStream in, boolean allowAlpha) throws java.io.IOException
in
- allowAlpha
-
java.io.IOException
public static DirectBufferedImage loadDirectImage(java.io.InputStream in) throws java.io.IOException
in
-
java.io.IOException
public static DirectBufferedImage loadDirectImage(java.net.URL url, boolean allowAlpha) throws java.io.IOException
url
- allowAlpha
-
java.io.IOException
public static java.awt.image.BufferedImage loadDirectImage(java.net.URL url) throws java.io.IOException
java.io.IOException
public static DirectBufferedImage loadDirectImage(java.io.File file, boolean allowAlpha) throws java.io.IOException
file
- allowAlpha
-
java.io.IOException
public static DirectBufferedImage loadDirectImage(java.io.File file) throws java.io.IOException
file
-
java.io.IOException
public static DirectBufferedImage loadDirectImage(java.lang.String name, boolean allowAlpha) throws java.io.IOException
name
- allowAlpha
-
java.io.IOException
public static DirectBufferedImage loadDirectImage(java.lang.String name) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |