public class FastBitmap
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
FastBitmap.ColorSpace
Color space.
|
static class |
FastBitmap.CoordinateSystem
Coodinate system.
|
| Constructor and Description |
|---|
FastBitmap()
Initialize a new instance of the FastBitmap class.
|
FastBitmap(java.awt.image.BufferedImage bufferedImage)
Initialize a new instance of the FastBitmap class.
|
FastBitmap(FastBitmap fastBitmap)
Initialize a new instance of the FastBitmap class.
|
FastBitmap(java.awt.Image image)
Initialize a new instance of the FastBitmap class.
|
FastBitmap(javax.swing.ImageIcon ico)
Initialize a new instance of the FastBitmap class.
|
FastBitmap(int[][] image)
Initialize a new instance of the FastBitmap class.
|
FastBitmap(int[][][] image)
Initialize a new instance of the FastBitmap class.
|
FastBitmap(int width,
int height)
Initialize a new instance of the FastBitmap class.
|
FastBitmap(int width,
int height,
FastBitmap.ColorSpace colorSpace)
Initialize a new instance of the FastBitmap class.
|
FastBitmap(java.lang.String pathname)
Initialize a new instance of the FastBitmap class.
|
| Modifier and Type | Method and Description |
|---|---|
int |
clampValues(int value,
int min,
int max)
Clamp values.
|
void |
Clear()
Clear all the image.
|
void |
createGraphics()
Create graphics.
|
int |
getAlpha(int offset)
Get alpha channel's value.
|
int |
getAlpha(int x,
int y)
Get Alpha.
|
int[] |
getARGB(int x,
int y)
Return ARGB color.
|
int[] |
getARGB(IntPoint point)
Return ARGB color.
|
int |
getBlue(int offset)
Get blue channel's value.
|
int |
getBlue(int x,
int y)
Get Green.
|
int |
getBlue(IntPoint point)
Get Blue.
|
FastBitmap.ColorSpace |
getColorSpace()
Get Space color.
|
FastBitmap.CoordinateSystem |
getCoordinateSystem()
Get the actually coordinate system.
|
java.awt.Graphics |
getGraphics()
Allow use Java`s Graphics.
|
int |
getGray(int offset)
Get gray channel's value.
|
int |
getGray(int x,
int y)
Get Gray.
|
int |
getGray(IntPoint point)
Get Gray.
|
byte[] |
getGrayData()
Retrieve the raw gray data from the Fast bitmap.
|
int |
getGreen(int offset)
Get green channel's value.
|
int |
getGreen(int x,
int y)
Get Green.
|
int |
getGreen(IntPoint point)
Get Green.
|
int |
getHeight()
Get height.
|
int |
getRed(int offset)
Get red channel's value.
|
int |
getRed(int x,
int y)
Get Red.
|
int |
getRed(IntPoint point)
Get Red.
|
int[] |
getRGB(int offset)
Return RGB color.
|
int[] |
getRGB(int x,
int y)
Return RGB color.
|
int[] |
getRGB(IntPoint point)
Return RGB color.
|
int[] |
getRGBData()
Retrieve the raw rgb or argb data from the Fast bitmap.
|
int |
getSize()
Get the size of the image in pixels.
|
int |
getWidth()
Get width.
|
boolean |
isARGB()
Verify ARGB space color.
|
boolean |
isGrayscale()
Verify Grayscale space color.
|
boolean |
isRGB()
Verify RGB space color.
|
void |
matrixToImage(double[][] image)
Convert Array to FastBitmap.
|
void |
matrixToImage(double[][][] image)
Convert Array to FastBitmap.
|
void |
matrixToImage(float[][] image)
Convert Array to FastBitmap.
|
void |
matrixToImage(float[][][] image)
Convert Array to FastBitmap.
|
void |
matrixToImage(int[][] image)
Convert Array to FastBitmap.
|
void |
matrixToImage(int[][][] image)
Convert Array to FastBitmap.
|
void |
saveAsBMP(java.lang.String pathname)
Save FastBitmap as Bitmap.
|
void |
saveAsGIF(java.lang.String pathname)
Save FastBitmap as GIF.
|
void |
saveAsJPG(java.lang.String pathname)
Save FastBitmap as JPG.
|
void |
saveAsJPG(java.lang.String pathname,
float quality)
Save FastBitmap as JPG.
|
void |
saveAsPNG(java.lang.String pathname)
Save FastBitmap as PNG.
|
void |
setAlpha(int offset,
int value)
Set alpha channel's value.
|
void |
setAlpha(int x,
int y,
int value)
Set Alpha.
|
void |
setARGB(int offset,
int[] argb)
Set ARGB values.
|
void |
setARGB(int x,
int y,
int[] rgb)
Set ARGB.
|
void |
setARGB(int offset,
int alpha,
int red,
int green,
int blue)
Set ARGB values.
|
void |
setARGB(int x,
int y,
int alpha,
int red,
int green,
int blue)
Set ARGB.
|
void |
setARGB(IntPoint point,
int[] rgb)
Set ARGB.
|
void |
setARGB(IntPoint point,
int alpha,
int red,
int green,
int blue)
Set ARGB.
|
void |
setBlue(int offset,
int value)
Set blue channel's value.
|
void |
setBlue(int x,
int y,
int value)
Set Blue.
|
void |
setBlue(IntPoint point,
int value)
Set Blue.
|
void |
setCoordinateSystem(FastBitmap.CoordinateSystem coSystem)
Set coordinate system.
|
void |
setGray(int offset,
int value)
Set gray channel's value.
|
void |
setGray(int x,
int y,
int value)
Set Gray.
|
void |
setGray(IntPoint point,
int value)
Set Gray.
|
void |
setGrayData(byte[] data)
Set the raw gray data in the Fast Bitmap.
|
void |
setGreen(int offset,
int value)
Set green channel's value.
|
void |
setGreen(int x,
int y,
int value)
Set Green.
|
void |
setGreen(IntPoint point,
int value)
Set Green.
|
void |
setImage(java.awt.image.BufferedImage bufferedImage)
Set image to FastBitmap.
|
void |
setImage(FastBitmap fastBitmap)
Set Image to Fast Bitmap.
|
void |
setRed(int offset,
int value)
Set red channel's value.
|
void |
setRed(int x,
int y,
int value)
Set Red.
|
void |
setRed(IntPoint point,
int value)
Set Red.
|
void |
setRGB(int offset,
Color color)
Set RGB values.
|
void |
setRGB(int offset,
int[] rgb)
Set RGB values.
|
void |
setRGB(int x,
int y,
Color color)
Set RGB.
|
void |
setRGB(int x,
int y,
int[] rgb)
Set RGB.
|
void |
setRGB(int offset,
int red,
int green,
int blue)
Set RGB values.
|
void |
setRGB(int x,
int y,
int red,
int green,
int blue)
Set RGB.
|
void |
setRGB(IntPoint point,
Color color)
Set RGB.
|
void |
setRGB(IntPoint point,
int[] rgb)
Set RGB.
|
void |
setRGB(IntPoint point,
int red,
int green,
int blue)
Set RGB.
|
void |
setRGBData(int[] data)
Set the raw rgb or argb data in the Fast Bitmap.
|
void |
toARGB()
Convert any others space colors to RGB.
|
double[] |
toArrayGrayAsDouble()
Convert the image to array of double representation.
|
float[] |
toArrayGrayAsFloat()
Convert the image to array of double representation.
|
int[] |
toArrayGrayAsInt()
Convert the image to array of double representation.
|
java.awt.image.BufferedImage |
toBufferedImage()
Convert FastBitmap to BufferedImage.
|
void |
toGrayscale()
Convert any others space color to Grayscale.
|
javax.swing.ImageIcon |
toIcon()
Convert FastBitmap to Icon.
|
java.awt.Image |
toImage()
Convert FastBitmap to Image.
|
double[][] |
toMatrixGrayAsDouble()
Convert the image to matrix of double representation.
|
float[][] |
toMatrixGrayAsFloat()
Convert the image to matrix of float representation.
|
int[][] |
toMatrixGrayAsInt()
Convert the image to matrix of integer representation.
|
double[][][] |
toMatrixRGBAsDouble()
Convert the image to matrix of integer representation.
|
float[][][] |
toMatrixRGBAsFloat()
Convert the image to matrix of integer representation.
|
int[][][] |
toMatrixRGBAsInt()
Convert the image to matrix of integer representation.
|
void |
toRGB()
Convert any others space colors to RGB.
|
public FastBitmap()
public FastBitmap(FastBitmap fastBitmap)
fastBitmap - FastBitmappublic FastBitmap(java.awt.image.BufferedImage bufferedImage)
bufferedImage - Buffered image.public FastBitmap(java.awt.Image image)
image - Image.public FastBitmap(javax.swing.ImageIcon ico)
ico - Ico.public FastBitmap(java.lang.String pathname)
pathname - The path that indicate a image.public FastBitmap(int width,
int height)
width - Width.height - Height.public FastBitmap(int width,
int height,
FastBitmap.ColorSpace colorSpace)
width - Width.height - Height.colorSpace - Space color.public FastBitmap(int[][] image)
image - Array.public FastBitmap(int[][][] image)
image - Array.public FastBitmap.ColorSpace getColorSpace()
public byte[] getGrayData()
public void setGrayData(byte[] data)
data - Data.public int[] getRGBData()
public int getSize()
public void setRGBData(int[] data)
data - public void setImage(java.awt.image.BufferedImage bufferedImage)
bufferedImage - BufferedImage.public void setImage(FastBitmap fastBitmap)
fastBitmap - FastBitmap.public FastBitmap.CoordinateSystem getCoordinateSystem()
public void setCoordinateSystem(FastBitmap.CoordinateSystem coSystem)
coSystem - Coordinate system.public java.awt.image.BufferedImage toBufferedImage()
public java.awt.Image toImage()
public javax.swing.ImageIcon toIcon()
public void toGrayscale()
public void toARGB()
public void toRGB()
public double[] toArrayGrayAsDouble()
public int[] toArrayGrayAsInt()
public float[] toArrayGrayAsFloat()
public int[][] toMatrixGrayAsInt()
public double[][] toMatrixGrayAsDouble()
public float[][] toMatrixGrayAsFloat()
public int[][][] toMatrixRGBAsInt()
public double[][][] toMatrixRGBAsDouble()
public float[][][] toMatrixRGBAsFloat()
public void matrixToImage(int[][] image)
image - Array.public void matrixToImage(float[][] image)
image - Array.public void matrixToImage(double[][] image)
image - Array.public void matrixToImage(int[][][] image)
image - Array.public void matrixToImage(float[][][] image)
image - Array.public void matrixToImage(double[][][] image)
image - Array.public void Clear()
public java.awt.Graphics getGraphics()
public void createGraphics()
public boolean isGrayscale()
public boolean isRGB()
public boolean isARGB()
public int getWidth()
public int getHeight()
public int[] getRGB(int offset)
offset - Offset.public int[] getRGB(int x,
int y)
x - X axis coordinate.y - Y axis coordinate.public int[] getRGB(IntPoint point)
point - Point.public int[] getARGB(int x,
int y)
x - X axis coordinate.y - Y axis coordinate.public int[] getARGB(IntPoint point)
point - Point.public void setRGB(int x,
int y,
Color color)
x - X axis coordinates.y - Y axis coordinates.color - RGB color.public void setRGB(int x,
int y,
int red,
int green,
int blue)
x - X axis coordinates.y - Y axis coordinates.red - Red channel's value.green - Green channel's value.blue - Blue channel's value.public void setRGB(IntPoint point, Color color)
point - IntPoint.color - RGB color.public void setRGB(IntPoint point, int red, int green, int blue)
point - IntPoint.red - Red channel's value.green - Green channel's value.blue - Blue channel's value.public void setRGB(int x,
int y,
int[] rgb)
x - X axis coordinates.y - Y axis coordinates.rgb - RGB color.public void setRGB(int offset,
int red,
int green,
int blue)
offset - Offset.red - Red channel's value.green - Green channel's value.blue - Blue channel's value.public void setRGB(int offset,
int[] rgb)
offset - Offset.rgb - RGB array.public void setRGB(int offset,
Color color)
offset - Offset.color - Color.public void setRGB(IntPoint point, int[] rgb)
point - IntPoint.rgb - RGB color.public void setARGB(int x,
int y,
int alpha,
int red,
int green,
int blue)
x - X axis coordinates.y - Y axis coordinates.alpha - Alpha channel's value.red - Red channel's value.green - Green channel's value.blue - Blue channel's value.public void setARGB(IntPoint point, int alpha, int red, int green, int blue)
point - IntPoint.alpha - Alpha channel's value.red - Red channel's value.green - Green channel's value.blue - Blue channel's value.public void setARGB(int x,
int y,
int[] rgb)
x - X axis coordinates.y - Y axis coordinates.rgb - ARGB color.public void setARGB(IntPoint point, int[] rgb)
point - IntPoint.rgb - ARGB color.public void setARGB(int offset,
int alpha,
int red,
int green,
int blue)
offset - Offset.alpha - Alpha channel's value.red - Red channel's value.green - Green channel's value.blue - Blue channel's value.public void setARGB(int offset,
int[] argb)
offset - Offset.argb - ARGB array.public int getGray(int x,
int y)
x - X axis coordinate.y - Y axis coordinate.public int getGray(IntPoint point)
point - Point contains X and Y coordinates.public int getGray(int offset)
offset - Offset.public void setGray(int offset,
int value)
offset - Offset.value - Gray channel's value.public void setGray(int x,
int y,
int value)
x - X axis coordinate.y - Y axis coordinate.value - Gray channel's value.public void setGray(IntPoint point, int value)
point - IntPoint.value - Gray channel's value.public int getAlpha(int x,
int y)
x - X Axis coordinate.y - Y Axis coordinate.public int getAlpha(int offset)
offset - Offset.public void setAlpha(int offset,
int value)
offset - Offset.value - Alpha channel's value.public void setAlpha(int x,
int y,
int value)
x - X axis coordinate.y - Y axis coordinate.value - Alpha channel's value.public int getRed(int x,
int y)
x - X axis component.y - Y axis component.public int getRed(IntPoint point)
point - IntPoint.public int getRed(int offset)
offset - Offset.public void setRed(int offset,
int value)
offset - Offset.value - Red channel's value.public void setRed(int x,
int y,
int value)
x - X axis coordinate.y - Y axis coordinate.value - Red channel's value.public void setRed(IntPoint point, int value)
point - IntPoint.value - Red channel's value.public int getGreen(int x,
int y)
x - X axis coordinate.y - Y axis coordinate.public int getGreen(IntPoint point)
point - IntPoint.public int getGreen(int offset)
offset - Offset.public void setGreen(int offset,
int value)
offset - Offset.value - Green channel's value.public void setGreen(int x,
int y,
int value)
x - X axis coordinate.y - Y axis coordinate.value - Green channel's value.public void setGreen(IntPoint point, int value)
point - IntPoint.value - Green channel's value.public int getBlue(int x,
int y)
x - X axis coordinate.y - Y axis coordinate.public int getBlue(IntPoint point)
point - IntPoint.public int getBlue(int offset)
offset - Offset.public void setBlue(int offset,
int value)
offset - Offset.value - Blue channel's value.public void setBlue(int x,
int y,
int value)
x - X axis coordinate.y - Y axis coordinate.value - Blue channel's value.public void setBlue(IntPoint point, int value)
point - IntPoint.value - Blue channel's value.public int clampValues(int value,
int min,
int max)
value - Value.min - Minimum value.max - Maximum value.public void saveAsBMP(java.lang.String pathname)
pathname - Path name.public void saveAsPNG(java.lang.String pathname)
pathname - Path name.public void saveAsGIF(java.lang.String pathname)
pathname - Path name.public void saveAsJPG(java.lang.String pathname,
float quality)
pathname - Path name.quality - Quality.public void saveAsJPG(java.lang.String pathname)
pathname - Path name.