Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.j3d.util.graphics
Class GraphicsConverter

    java.lang.Object
      net.sf.j3d.util.graphics.GraphicsConverter

    public class GraphicsConverter

extends Object

The GraphicsConverter class provides static methods that allow conversion between colors and images stored as RGB objects and those stored as AWT colors.

Author:
  Mike Murray

Field Summary
`static int` | `image32Bit`
`static int` | `image8Bit`

Constructor Summary
`GraphicsConverter()`

Method Summary
`static Color` | `convertToAWTColor(RGB color)` Converts the specified RGB object to an AWT Color object.
`static Image` | `convertToAWTImage(RGB[][] image)` Converts the specified array of RGB objects to an AWT Image object.
`static RGB` | `convertToRGB(Color color)` Converts the specified AWT Color object to an RGB object.
`static RGB[][]` | `convertToRGBArray(BufferedImage bufferedImage)`
`static RGB[][]` | `convertToRGBArray(BufferedImage bufferedImage, int xoff, int yoff, int w, int h)`
`static RGB[][]` | `convertToRGBArray(Image image)` Converts the specified AWT Image object to an array of RGB objects.
`static RGB[][]` | `convertToRGBArray(int[] pixel, int off, int x, int y, int w, int h, int imageW)`
`static int[]` | `extract32BitImage(RenderedImage im)`
`static byte[]` | `extract8BitImage(RenderedImage im)`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### image32Bit

    public static final int image32Bit

See Also:
  Constant Field Values

### image8Bit

    public static final int image8Bit

See Also:
  Constant Field Values

Constructor Detail

### GraphicsConverter

    public GraphicsConverter()

Method Detail

### convertToRGB

    public static RGB convertToRGB(Color color)

  Converts the specified AWT Color object to an RGB object.

### convertToAWTColor

    public static Color convertToAWTColor(RGB color)

  Converts the specified RGB object to an AWT Color object.

### convertToRGBArray

    public static RGB[][] convertToRGBArray(Image image)

  Converts the specified AWT Image object to an array of RGB objects. The array locations map to pixels in the image. The image will be converted to the standard RGB color model if it is not already and the alpha channel will be ignored.

### extract32BitImage

    public static int[] extract32BitImage(RenderedImage im)

### extract8BitImage

    public static byte[] extract8BitImage(RenderedImage im)

### convertToRGBArray

    public static RGB[][] convertToRGBArray(BufferedImage bufferedImage)

### convertToRGBArray

    public static RGB[][] convertToRGBArray(int[] pixel,
                                            int off,
                                            int x,
                                            int y,
                                            int w,
                                            int h,
                                            int imageW)

### convertToRGBArray

    public static RGB[][] convertToRGBArray(BufferedImage bufferedImage,
                                            int xoff,
                                            int yoff,
                                            int w,
                                            int h)

### convertToAWTImage

    public static Image convertToAWTImage(RGB[][] image)

  Converts the specified array of RGB objects to an AWT Image object. The array locations map to pixels in the image. The image produced uses the RGB color model with no alpha channel.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD