code/WPILib/Vision/BinaryImage.cpp
/**
 * Write a binary image to flash.
 * Writes the binary image to flash on the cRIO for later inspection.
 * @param fileName the name of the image file written to the flash.
 */
Write a binary image to flash.
Writes the binary image to flash on the cRIO for later inspection.
@param fileName the name of the image file written to the flash.
Write a binary image to flash . Writes the binary image to flash on the cRIO for later inspection . @param fileName the name of the image file written to the flash .
void BinaryImage::Write(const char *fileName)
{
	RGBValue colorTable[256];
	Priv_SetWriteFileAllowed(1);
	memset(colorTable, 0, sizeof(colorTable));
	colorTable[0].R = 0;
	colorTable[1].R = 255;
	colorTable[0].G = colorTable[1].G = 0;
	colorTable[0].B = colorTable[1].B = 0;
	colorTable[0].alpha = colorTable[1].alpha = 0;
	imaqWriteFile(m_imaqImage, fileName, colorTable);
	return;
}
void BinaryImage :: Write ( const char * fileName ) { RGBValue colorTable [ 256 ] ; Priv_SetWriteFileAllowed ( 1 ) ; memset ( colorTable , 0 , sizeof ( colorTable ) ) ; colorTable [ 0 ] . R = 0 ; colorTable [ 1 ] . R = 255 ; colorTable [ 0 ] . G = colorTable [ 1 ] . G = 0 ; colorTable [ 0 ] . B = colorTable [ 1 ] . B = 0 ; colorTable [ 0 ] . alpha = colorTable [ 1 ] . alpha = 0 ; imaqWriteFile ( m_imaqImage , fileName , colorTable ) ; return ; }
Write a binary image to flash.
Write a binary image to flash .