001/*----------------------------------------------------------------------------*/
002/* Copyright (c) FIRST 2008-2012. All Rights Reserved.                        */
003/* Open Source Software - may be modified and shared by FRC teams. The code   */
004/* must be accompanied by the FIRST BSD license file in the root directory of */
005/* the project.                                                               */
006/*----------------------------------------------------------------------------*/
007
008package edu.wpi.first.wpilibj.image;
009
010import com.ni.vision.NIVision;
011
012/**
013 * A color image represented in RGB color space at 3 bytes per pixel.
014 * @author dtjones
015 */
016public class RGBImage extends ColorImage {
017
018    /**
019     * Create a new 0x0 image.
020     */
021    public RGBImage() throws NIVisionException {
022        super(NIVision.ImageType.IMAGE_RGB);
023    }
024
025    RGBImage(RGBImage sourceImage) {
026        super(sourceImage);
027    }
028
029    /**
030     * Create a new image by loading a file.
031     * @param fileName The path of the file to load.
032     */
033    public RGBImage(String fileName) throws NIVisionException {
034        super(NIVision.ImageType.IMAGE_RGB);
035        NIVision.imaqReadFile(image, fileName);
036    }
037}