rem: tgaRowData[tgapixcol] = 255;
add: medRowData[tgapixcol] = 255;
context: translate_from_bits1_to_tgabw(BPositionIO *inSource,	BPositionIO *outDestination, int32 bitsRowBytes,	TGAImageSpec &imagespec, bool brle){	int32 tgaRowBytes = imagespec.width;	uint32 tgapixrow = 0;	uint8 *tgaRowData = new uint8[tgaRowBytes];	if (!tgaRowData)		return B_ERROR;	uint8 *bitsRowData = new uint8[bitsRowBytes];	if (!bitsRowData) {		delete[] tgaRowData;		return B_ERROR;	}	ssize_t rd = inSource->Read(bitsRowData, bitsRowBytes);	while (rd == bitsRowBytes) {		uint32 tgapixcol = 0;		for (int32 i = 0; (tgapixcol < imagespec.width) && 			(i < bitsRowBytes); i++) {			// process each byte in the row			uint8 pixels = bitsRowData[i];			for (uint8 compbit = 128; (tgapixcol < imagespec.width) &&				compbit; compbit >>= 1) {				// for each bit in the current byte, convert to a TGA palette				// index and store that in the tgaRowData				if (pixels & compbit)					// black					tgaRowData[tgapixcol] = 0;				else					// white					tgaRowData[tgapixcol] = 255;				tgapixcol++;			}		}						outDestination->Write(tgaRowData, tgaRowBytes);		tgapixrow++;		// if I've read all of the pixel data, break		// out of the loop so I don't try to read 		// non-pixel data		if (tgapixrow == imagespec.height)			break;		rd = inSource->Read(bitsRowData, bitsRowBytes);	} // while (rd == bitsRowBytes)		delete[] tgaRowData;	delete[] bitsRowData;	return B_OK;}