Add new comment

Thanks yet again,

Thanks yet again,

Here's a shortened version of the code I'm proposing to use to process the data at raw_image

#define RAW(row,col) \
	BOOL littleEndian = htons(0x55aa) != 0x55aa;
	if (!m_bColorRAW)
		// This is a regular RAW file, so we should have the "raw" 16-bit greyscale
		// pixel array hung off RawData.raw_image.
		ZASSERT(NULL != RawData.raw_image);
		// stuff omitted
		// Convert raw data to big-endian 
		if littleEndian
				S.raw_height*S.raw_pitch);		// Use number of rows times row width in BYTES!!
		for (int row = 0; row < S.height; row++)
			// Write raw pixel data into our private bitmap format
			pFiller->Write(RAW(raw, S.left_margin), sizeof(ushort), S.width);

Does that make sense? Is it correct?


David Partridge