com.t4l.jmf
Class RGBConverter
java.lang.Object
com.t4l.jmf.RGBConverter
public class RGBConverter
- extends java.lang.Object
Alternate implementation of BufferToImage.
TODO: move the best of this code into BufferToImage.
- Author:
- Jeremy Wood
Method Summary |
static void |
flipVertical(int[] data,
int width,
int height)
|
static void |
populateArray(java.awt.image.BufferedImage image,
int[] dest,
RGBFormat format)
Extracts the image data from the BufferedImage and stores it in the array
provided. |
static void |
populateImage(int[] array,
int offset,
java.awt.image.BufferedImage image,
RGBFormat vf)
Takes the data in array and fills the BufferedImage
with that image. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RGBConverter
public RGBConverter()
populateImage
public static void populateImage(int[] array,
int offset,
java.awt.image.BufferedImage image,
RGBFormat vf)
- Takes the data in
array
and fills the BufferedImage
with that image.
- Parameters:
array
- the array of pixel dataimage
- the image to store the data invf
- the format the array is provided in
populateArray
public static void populateArray(java.awt.image.BufferedImage image,
int[] dest,
RGBFormat format)
- Extracts the image data from the BufferedImage and stores it in the array
provided.
- Parameters:
image
- this needs to be of type INT_ARGB, INT_RGB or INT_ARGB_PRE
for best performancedest
- the int array to populate with red, green and blue components.format
- the format the dest array needs to be written in
flipVertical
public static void flipVertical(int[] data,
int width,
int height)