I am currently working on visual c++ 2008 express edition. My project is based on reading satellite images and applying image processing on them. Each image file has an ".0FM" format and is of 8Mb size.
Until now I have been able to read the file (i.e., "*.0FM" ) using a FileStream and into a Byte array, the size of the byte array is 8,000,000.
I then converted each element off the byte array to Decimal, so now each element in the array has values ranging from 0 - 255. Now I have to convert each of these Decimal values in the array into its binary values. E.g., 86 should be converted into 1010110
I am really stuck here. I tried System::Decimal::GetBits()
method but all this method does is that it stores 86 into bits[0],
Decimal d = 86;
array<int>^ buf_bits = Decimal::GetBits(d);
This code results in the storing of value 86 in buf_bits[0], I do not get 1010110.