|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlegacy.resource.Format
legacy.resource.codecs.image.NativeImageFormat
public class NativeImageFormat
NativeImageFormat.class is the base for image files as reads files as defined readInt() = width readInt() = height readBoolean() = has Alpha readBoolean() = has Transparency readInt() = Transparency should be indicated above and -1 is read as indiction of no transparency readInt()...width> times height read a packed in containg RGB in the format AARRGGBB 14bytes+(width*height*4)bytes This is a very simple form as is makes things simpler when reading a image and transcoding it. it is also important to note what is read becomes irrelevent quickly as images are adjusted to suit the active VideoAdapter when read.
Constructor Summary | |
---|---|
NativeImageFormat(java.io.InputStream stream)
Constructor for Image Storage. |
Method Summary | |
---|---|
int |
getAlpha(int x,
int y)
getPixel returns a pixels alpha level at the given coordinaters |
int[] |
getAlphaRegion(int x,
int y,
int width,
int height)
getAlphaRegion copys an area to a array filled with alpha levels |
int[] |
getAlphaScanline(int x,
int y,
int width)
getAlphaScanline return a copy of this image and allows for after x offset and overrun checking. |
int |
getHeight()
|
int |
getPixel(int x,
int y)
getPixel returns pixel at the given coordinaters |
int[] |
getPixelRegion(int x,
int y,
int width,
int height)
getPixelRegion copys an area to a array filled with index colors |
int[] |
getPixelScanline(int x,
int y,
int width)
getPixelScanline return a copy of this image and allows for after x offset and overrun checking. |
int |
getTransparency()
|
int |
getWidth()
|
boolean |
hasAlphaMap()
|
boolean |
hasTransparency()
|
void |
putAlpha(int x,
int y,
int level)
putAlpha(int x, int y, int level) places a pixel on the active video buffer |
void |
putPixel(int x,
int y,
int color)
putPixel(int x, int y, int color) places a pixel on the active video buffer |
void |
putPixel(int x,
int y,
RGB rgb)
putPixel(int x, int y, RGB rgb) places a pixel on the active video buffer |
Methods inherited from class legacy.resource.Format |
---|
getFormatLoadLock |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NativeImageFormat(java.io.InputStream stream) throws java.io.IOException
stream
- the stram to read.
java.io.IOException
Method Detail |
---|
public int getWidth()
public int getHeight()
public boolean hasAlphaMap()
public boolean hasTransparency()
public int getTransparency()
public int getPixel(int x, int y)
x
- offsety
- offset
public int getAlpha(int x, int y)
x
- offsety
- offset
public int[] getPixelRegion(int x, int y, int width, int height)
x
- offsety
- offetwidth
- bounding widthheight
- bounding height
public int[] getAlphaRegion(int x, int y, int width, int height)
x
- offsety
- offetwidth
- bounding widthheight
- bounding height
public int[] getPixelScanline(int x, int y, int width)
x
- offsety
- offsetwidth
- width to read.
public int[] getAlphaScanline(int x, int y, int width)
x
- offsety
- offsetwidth
- width to read.
public void putPixel(int x, int y, int color)
x
- coordinatey
- coordinatecolor
- as pallet indexpublic void putAlpha(int x, int y, int level)
x
- coordinatey
- coordinatelevel
- alpha levelpublic void putPixel(int x, int y, RGB rgb)
x
- coordinatey
- coordinatergb
- color
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |