RawFrame

Package | Class | Use | Tree | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.epiphan.vga2usb
Class RawFrame

    Object
      com.epiphan.vga2usb.BasicFrame
          com.epiphan.vga2usb.RawFrame

public final class RawFrame
extends com.epiphan.vga2usb.BasicFrame

A single grabbed frame in arbitrary format supported by VGA2USB hardware. Gives the client direct access to the pixel buffer. Unlike the `Frame` class, it doesn't provide a convenient way to transform pixels into an `Image`. It's up to the client to decide what to do with the raw pixels.

See Also:
  `Frame`, `Grabber`

Field Summary
`protected PixelFormat` | `format` The pixel format.
`protected int` | `height` Frame height.
`protected int` | `length` Part of the pixels array which is actually occupied by pixels.
`protected byte[]` | `pixels` Frame pixels.
`protected int` | `width` Frame width.

Method Summary
`int` | `getHeight()` Returns the height of the frame (number of rows).
`byte[]` | `getPixelBuffer()` Gives the caller direct access to the pixel buffer.
`int` | `getPixelBufferLength()` Returns number of bytes in the pixel buffer that are actually occupied by pixel data.
`PixelFormat` | `getPixelFormat()` Get the pixel format.
`int` | `getWidth()` Returns the width of the frame (number of columns).

Methods inherited from class Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### format

    protected PixelFormat format

  The pixel format.

### height

    protected int height

  Frame height.

### length

    protected int length

  Part of the pixels array which is actually occupied by pixels.

### pixels

    protected byte[] pixels

  Frame pixels.

### width

    protected int width

  Frame width.

Method Detail

### getPixelBuffer

    public byte[] getPixelBuffer()

  Gives the caller direct access to the pixel buffer. Note that the pixels may occupy only part of the array under certain (fairly rare) conditions. The number of bytes actually containing the pixels is obtained by calling `getPixelBufferLength()` method. The rest of the array should be ignored.

  Returns:
    Reference to the pixel buffer.
  See Also:
    `getPixelBufferLength()`

### getPixelBufferLength

    public int getPixelBufferLength()

  Returns number of bytes in the pixel buffer that are actually occupied by pixel data. The rest of the buffer should be ignored.

  Returns:
    The actual size of the frame.
  See Also:
    `getPixelBuffer()`

### getPixelFormat

    public PixelFormat getPixelFormat()

  Get the pixel format.

  Returns:
    The pixel format.

### getHeight

    public final int getHeight()

  Returns the height of the frame (number of rows).

  Returns:
    The frame height.

### getWidth

    public final int getWidth()

  Returns the width of the frame (number of columns).

  Returns:
    The frame width.

Package | Class | Use | Tree | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2012 Epiphan Systems Inc. All rights reserved.