edu.wpi.first.wpilibj.image
Class Image

java.lang.Object
  extended by edu.wpi.first.wpilibj.image.Image
Direct Known Subclasses:
ColorImage, MonoImage

public abstract class Image
extends java.lang.Object

Class representing a generic image.

Author:
dtjones

Field Summary
 Pointer image
          Pointer to the image memory
 
Method Summary
 void free()
          Release the memory associated with an image.
 int getHeight()
          Get the height of the image in pixels.
 int getWidth()
          Get the width of the image in pixels.
 void write(java.lang.String fileName)
          Write the image to a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

image

public final Pointer image
Pointer to the image memory

Method Detail

write

public void write(java.lang.String fileName)
           throws NIVisionException
Write the image to a file. Supported extensions: .aipd or .apd AIPD .bmp BMP .jpg or .jpeg JPEG .jp2 JPEG2000 .png PNG .tif or .tiff TIFF

Parameters:
fileName - The path to write the image to.
Throws:
NIVisionException

free

public void free()
          throws NIVisionException
Release the memory associated with an image.

Throws:
NIVisionException

getHeight

public int getHeight()
              throws NIVisionException
Get the height of the image in pixels.

Returns:
The height of the image.
Throws:
NIVisionException

getWidth

public int getWidth()
             throws NIVisionException
Get the width of the image in pixels.

Returns:
The width of the image.
Throws:
NIVisionException