- uint16_t *binArea16 = (uint16_t*)binArea;
- for (int j=0;j<nbPieces;j++)
- {
- for (int i = 0; i < BUFFER_SIZE/2; i++)
- {
- //buffer[i] = (binArea16[i] >> 8) | (binArea16[i] << 8);
- uint16_t val = binArea16[i];
- buffer[i] = ((( val << 8 ) & 0xff00 ) | (( val >> 8 ) & 0x00ff ) );
- }
- fp->write ( (char*)buffer, BUFFER_SIZE );
- binArea16 += BUFFER_SIZE/2;
- }
- if ( remainingSize > 0)
- {
- for (int i = 0; i < remainingSize/2; i++)
- {
- //buffer[i] = (binArea16[i] >> 8) | (binArea16[i] << 8);
- uint16_t val = binArea16[i];
- buffer[i] = ((( val << 8 ) & 0xff00 ) | (( val >> 8 ) & 0x00ff ) );
- }
- fp->write ( (char*)buffer, remainingSize );
- }
- delete[] buffer;
+ // 8 Bits Pixels *are* OB, 16 Bits Pixels *are* OW
+ // -value forced while Reading process-
+
+ //-->
+ // -->
+ // --> WARNING
+ // --> the following lines *looked* very clever,
+ // --> but they don't work on big endian processors.
+ // --> since I've no access for the moment to a big endian proc :-(
+ // --> I comment them out, to see the result on the dash board
+ // -->
+
+ // --> Revert to initial code : TestWriteSimple hangs on Darwin :-(
+ if (GetGroup() == 0x7fe0 && GetVR() == "OW")
+ {
+ uint16_t *binArea16 = (uint16_t*)binArea8;
+ binary_write (*fp, binArea16, lgr );