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 008 package edu.wpi.first.wpilibj.image; 009 010 /** 011 * A color image represented in RGB color space at 3 bytes per pixel. 012 * @author dtjones 013 */ 014 public class RGBImage extends ColorImage{ 015 016 /** 017 * Create a new 0x0 image. 018 */ 019 public RGBImage() throws NIVisionException{ 020 super(NIVision.ImageType.imaqImageRGB); 021 } 022 023 RGBImage(RGBImage sourceImage) { 024 super(sourceImage); 025 } 026 027 /** 028 * Create a new image by loading a file. 029 * @param fileName The path of the file to load. 030 */ 031 public RGBImage(String fileName) throws NIVisionException{ 032 super(NIVision.ImageType.imaqImageRGB); 033 NIVision.readFile(image, fileName); 034 } 035 }