2

I have these data files that are generated by a tool which was distributed by a company that is long defunct. I have been taking it apart with a binary file viewer (freeware from Proxoft, it is a great tool) and I am close to completion. Here is an image of the PDF generated by the tool from the data file:

image

The file contains a 320x320x8bit image, actually there are 4 bytes representing 4 images. The file length is 412900 bytes. There is a header of 3128 bytes, followed by the 320*320*4 byte image data, followed by a 172 byte footer.

In the header there are human readable strings, followed by mostly zeroes with some non-zero bytes, that clearly have some pattern, which repeats then by another human readable header. This is the (encoded?) data I seek I believe.

What I am asking here is for some expertise on decoding what appears to be the data I am trying to extract between items in the header and the footer. I have tried big endian, little endian, 1,2,4,8 byte views of the bytes, and I cannot figure it out. If someone can help me figure this out, it would be much appreciated.

Here are some bytes showing human readable parts (from 3128 byte header), and the spaces in between:

001072 ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ T E R M ◦ ◦ ◦ ◦
001088 ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦
001104 ◦ ◦ ◦ ◦ ◦ ◦ P I X E L C O U N T
001120 ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦
001136 ◦ ◦ ◦ ◦ V A L L E Y ◦ ◦ ◦ ◦ ◦ ◦
001152 ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦
001168 ◦ ◦ P E A K ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦
001184 ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦
001200 R M S ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦
001216 ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ R A
001232 ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦
001248 ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ R S ◦ ◦

Since I have no good way to post the actual data, I have uploaded it remotely:

http://www.rettc.com/binarydecode/

.mmd is binary file, .pdf is pdf from the software, .bmp is my extracted image data, .png is an image of the pdf.

So, if anyone can figure out how to decode the data in between the human readable items in the header and footer of this binary file, you will be officially recognized as "da man!" or "da woman!" by me eternally.

Thanks for taking a look!

  • Starting at the first character of each readable word, there is exactly 30 (counting in decimal) bytes. If the rest of the bytes aren't filler, then they could be information related to, say, PIXELCOUNT in which subsequent bytes might have that type of information (whatever it may be). Or, subsequent bytes could be pointers to other locations in the file--i.e. you may see bytes 1C 14 which could be little endian for 00141C in the file (that location perhaps holding relevant data to that section). Also, an abundance of 0s can indicate compression of some sort (though probably not in this case). – dsasmblr Aug 1 '17 at 12:40
2

the header consists of 2280 bytes or 0x8e8 bytes as indicated in the first DIRECTORY

each of the item is 30 bytes or 0x1e bytes long

so around 76 items can fit in the header

each last dword in the item denotes the length of the item

so DIRECTORY is 0x8e8
TITLE is 0x80 time is 0x14

the header can be dumped with xxd like this

:\>xxd -s 0 -g30 -c 30 -l 0x8e8 21SIDEB.MMD
0000000: 4449524543544f525900460084d846006936430000014b000100e8080000  DIRECTORY.F...F.i6C...K.......
000001e: 5449544c4500000000000000000000000000000000020100800080000000  TITLE.........................
000003c: 54494d450000000000000000000000000000000000020100140014000000  TIME..........................
000005a: 444154450000000000000000000000000000000000020100140014000000  DATE..........................
0000078: 444154415459504500000000000000000000000000020100140014000000  DATATYPE......................
0000096: 444151000000000000000000000000000000000000020100140014000000  DAQ...........................
00000b4: 504843000000000000000000000000000000000000020100140014000000  PHC...........................
00000d2: 5245434f4e00000000000000000000000000000000020100140014000000  RECON.........................
00000f0: 4445544d41534b0000000000000000000000000000020100140014000000  DETMASK.......................
000010e: 5445524d41534b0000000000000000000000000000020100140014000000  TERMASK.......................
000012c: 4441544d41534b0000000000000000000000000000020100140014000000  DATMASK.......................
000014a: 52454646494c450000000000000000000000000000020100140014000000  REFFILE.......................
0000168: 494e535452554d454e540000000000000000000000020100140014000000  INSTRUMENT....................
0000186: 53455155454e434500000000000000000000000000040100010002000000  SEQUENCE......................
00001a4: 53455249414c000000000000000000000000000000020100140014000000  SERIAL........................
00001c2: 504152544944000000000000000000000000000000020100140014000000  PARTID........................
00001e0: 585354414745000000000000000000000000000000060100010004000000  XSTAGE........................
00001fe: 595354414745000000000000000000000000000000060100010004000000  YSTAGE........................
000021c: 5a5354414745000000000000000000000000000000060100010004000000  ZSTAGE........................
000023a: 544845544153544147450000000000000000000000060100010004000000  THETASTAGE....................
0000258: 5350454349414c5048415345000000000000000000020100140014000000  SPECIALPHASE..................
0000276: 5350454349414c4441544100000000000000000000020100140014000000  SPECIALDATA...................
0000294: 46494c5445524c4142454c00000000000000000000020100140014000000  FILTERLABEL...................
00002b2: 4d41474c4142454c00000000000000000000000000020100140014000000  MAGLABEL......................
00002d0: 43414d4552415f4c4142454c000000000000000000020100140014000000  CAMERA_LABEL..................
00002ee: 545542455f4c4142454c0000000000000000000000020100140014000000  TUBE_LABEL....................
000030c: 58504958454c000000000000000000000000000000060100010004000000  XPIXEL........................
000032a: 59504958454c000000000000000000000000000000060100010004000000  YPIXEL........................
0000348: 5a5343414c45000000000000000000000000000000060100010004000000  ZSCALE........................
0000366: 4f524947494e580000000000000000000000000000040100010002000000  ORIGINX.......................
0000384: 4f524947494e590000000000000000000000000000040100010002000000  ORIGINY.......................
00003a2: 505a54534849465400000000000000000000000000060100010004000000  PZTSHIFT......................
00003c0: 4d4f44544852455348000000000000000000000000060100010004000000  MODTHRESH.....................
00003de: 534d4f4f5448000000000000000000000000000000060100010004000000  SMOOTH........................
00003fc: 424144504958454c00000000000000000000000000060100010004000000  BADPIXEL......................
000041a: 524547494f4e530000000000000000000000000000040100010002000000  REGIONS.......................
0000438: 5445524d0000000000000000000000000000000000020100140014000000  TERM..........................
0000456: 504958454c434f554e540000000000000000000000050100010004000000  PIXELCOUNT....................
0000474: 56414c4c4559000000000000000000000000000000060100010004000000  VALLEY........................
0000492: 5045414b0000000000000000000000000000000000060100010004000000  PEAK..........................
00004b0: 524d53000000000000000000000000000000000000060100010004000000  RMS...........................
00004ce: 524100000000000000000000000000000000000000060100010004000000  RA............................
00004ec: 525300000000000000000000000000000000000000060100010004000000  RS............................
000050a: 435300000000000000000000000000000000000000060100010004000000  CS............................
0000528: 523100000000000000000000000000000000000000060100010004000000  R1............................
0000546: 523200000000000000000000000000000000000000060100010004000000  R2............................
0000564: 413100000000000000000000000000000000000000060100010004000000  A1............................
0000582: 4d45414e0000000000000000000000000000000000060100010004000000  MEAN..........................
00005a0: 5445524d53000000000000000000000000000000000701001c00e0000000  TERMS.........................
00005be: 444154410000000000000000000000000000000000064001400100400600  DATA..................@.@..@..
00005dc: 4d4f44454e414d4500000000000000000000000000020100140014000000  MODENAME......................
00005fa: 545542454e414d4500000000000000000000000000020100140014000000  TUBENAME......................
0000618: 52454c41594e414d45000000000000000000000000020100140014000000  RELAYNAME.....................
0000636: 43414d4552414e414d450000000000000000000000020100140014000000  CAMERANAME....................
0000654: 4f50455241544f5200000000000000000000000000020100140014000000  OPERATOR......................
0000672: 4c4f544e554d424552000000000000000000000000020100140014000000  LOTNUMBER.....................
0000690: 504152544e554d4245520000000000000000000000020100140014000000  PARTNUMBER....................
00006ae: 58444543494d4154494f4e00000000000000000000040100010002000000  XDECIMATION...................
00006cc: 59444543494d4154494f4e00000000000000000000040100010002000000  YDECIMATION...................
00006ea: 46494c544552574156454c454e4754480000000000060100010004000000  FILTERWAVELENGTH..............
0000708: 4f424a4543544956454d4147000000000000000000060100010004000000  OBJECTIVEMAG..................
0000726: 4f424a4543544956454e4100000000000000000000060100010004000000  OBJECTIVENA...................
0000744: 545542454d41470000000000000000000000000000060100010004000000  TUBEMAG.......................
0000762: 52454c41594d414700000000000000000000000000060100010004000000  RELAYMAG......................
0000780: 43414d45524158504958454c000000000000000000060100010004000000  CAMERAXPIXEL..................
000079e: 43414d45524159504958454c000000000000000000060100010004000000  CAMERAYPIXEL..................
00007bc: 000000000000000000000000000000000000000000000000000000000000  ..............................
00007da: 000000000000000000000000000000000000000000000000000000000000  ..............................
00007f8: 000000000000000000000000000000000000000000000000000000000000  ..............................
0000816: 000000000000000000000000000000000000000000000000000000000000  ..............................
0000834: 000000000000000000000000000000000000000000000000000000000000  ..............................
0000852: 000000000000000000000000000000000000000000000000000000000000  ..............................
0000870: 000000000000000000000000000000000000000000000000000000000000  ..............................
000088e: 000000000000000000000000000000000000000000000000000000000000  ..............................
00008ac: 000000000000000000000000000000000000000000000000000000000000  ..............................
00008ca: 000000000000000000000000000000000000000000000000000000000000  ..............................

the title ican be dumped like this

:\>xxd -s 0x8e8 -g16 -l 0x80 21SIDEB.MMD
00008e8: 32312053494445204200736500000000  21 SIDE B.se....
00008f8: 0000000088f61200000000006cf91200  ............l...
0000908: 8f04447eb08e427e7419dd73b825ea73  ..D~..B~t..s.%.s
0000918: 400000000300000044f71200b825ea73  @.......D....%.s
0000928: a825ea73b8f612002cf712000042e673  .%.s....,....B.s
0000938: ffffffff44f7120058f7120004f71200  ....D...X.......
0000948: f27ce273489ceb00fd99eb0090224700  .|.sH........"G.
0000958: 84d8460014d94600d87c420040010000  ..F...F..|B.@...

time date and datatype

:\>xxd -s 0x968 -g16 -l 0x14 21SIDEB.MMD
0000968: 31363a30333a35340000736500000000  16:03:54..se....
0000978: 00000000                          ....

:\>xxd -s 0x97c -g16 -l 0x14 21SIDEB.MMD
000097c: 323031372d30372d3131006500000000  2017-07-11.e....
000098c: 00000000                          ....

:\>xxd -s 0x990 -g16 -l 0x14 21SIDEB.MMD
0000990: 53555246414345004f4e00004f464600  SURFACE.ON..OFF.
00009a0: 44454255                          DEBU

based on this the data should start at 0xc38

>>> import struct
>>> fin = open("21sideb.mmd" ,"rb")
>>> for i in range(0x1a,30*76,30):
...     fin.seek(i)
...     print "0x%x+" % struct.unpack("i",fin.read(4)),
...
0x8e8+ 0x80+ 0x14+ 0x14+ 0x14+ 0x14+ 0x14+ 0x14+ 0x14+ 0x14+ 0x14+ 0x14+ 0x14+ 0x2+ 0x14+ 0x14+ 0x4+ 0x4+ 0x4+
 0x4+ 0x14+ 0x14+ 0x14+ 0x14+ 0x14+ 0x14+ 0x4+ 0x4+ 0x4+ 0x2+ 0x2+ 0x4+ 0x4+ 0x4+ 0x4+ 0x2+ 0x14+ 0x4+ 0x4+ 0x
4+ 0x4+ 0x4+ 0x4+ 0x4+ 0x4+ 0x4+ 0x4+ 0x4+ 0xe0+ 0x64000+ 0x14+ 0x14+ 0x14+ 0x14+ 0x14+ 0x14+ 0x14+ 0x2+ 0x2+
0x4+ 0x4+ 0x4+ 0x4+ 0x4+ 0x4+ 0x4+ 0x0+ 0x0+ 0x0+ 0x0+ 0x0+ 0x0+ 0x0+ 0x0+ 0x0+ 0x0+
>>>

ccalc > 0x8e8+ 0x80+ 0x14+ 0x14+ 0x14+ 0x14+ 0x14+ 0x14+ 0x14+ 0x14+ 0x14+ 0x14+ 0x14+ 0x2+ 0x14+ 0x14+ 0x4+ 0x4+ 0x4+ 0x4+ 0x14+ 0x14+ 0x14+ 0x14+ 0x14+ 0x14+ 0x4+ 0x4+ 0x4+ 0x2+ 0x2+ 0x4+ 0x4+ 0x4+ 0x4+ 0x2+ 0x14+ 0x4+ 0x4+ 0x4+ 0x4+ 0x4+ 0x4+ 0x4+ 0x4+ 0x4+ 0x4+ 0x4+ 0xe0

ans = 0x0C38

python script to rip the file into pieces as denoted in the header

import struct
fin = open("21sideb.mmd","rb")
itemaddr = 0

for i in range (0x1a,30*75,30):
    fin.seek(i+4)
    print str(fin.read(15)),
    fin.seek(i)                             
    addone = struct.unpack("i",fin.read(4)) 
    itemaddr += addone[0];                  # addr of NEXTITEM 
    fin.seek(i+30)
    addtwo = struct.unpack("i",fin.read(4)) # size of NEXTITEM    
    fin.seek(itemaddr)    
    print "size = %s bytes  ItemData = %s\n" % ( str(hex(addtwo[0])) ,  hex(itemaddr))
    if(itemaddr != 0xc38):
        print struct.unpack( (str(addtwo[0]) + "s"),fin.read(addtwo[0]))
        print "\n"

fin.close()

each item seperately printed

 C:\>python carvemmd.py TITLE size = 0x80 bytes ItemData = 0x8e8 
('21 SIDE 
B\x00se\x00\x00\x00\x00\x00\x00\x00\x00\x88\xf6\x12\x00\x00\x00\x00\x00l 
\xf9\x12\x00\x8f\x04D~\xb0\x8eB~t\x19\xdds\xb8%\xeas@\x00\x00\x00\x03\x00
\x00\x00D\xf7\x12\x00\xb8%\xeas\xa8%\xeas\xb8\xf6\x12\x00,\xf7\x12\x00\x00B
\xe6s\xff\xff\xff\xffD\xf7\x12\x00X\xf7\x12\x00\x04\xf7\x12\x00\xf2|\xe2sH
\x9c\xeb\x00\xfd\x99\xeb\x00\x90"G\x00\x84\xd8F\x00\x14\xd9F\x00\xd8|B\x00@
\x01\x00\x00',) 
TIME size = 0x14 bytes ItemData = 0x968 
('16:03:54\x00\x00se\x00\x00\x00\x00\x00\x00\x00\x00',) 
DATE size = 0x14 bytes ItemData = 0x97c 
('2017-07-11\x00e\x00\x00\x00\x00\x00\x00\x00\x00',) 
DATATYPE size = 0x14 bytes ItemData = 0x990 
('SURFACE\x00ON\x00\x00OFF\x00DEBU',) 
DAQ size = 0x14 bytes ItemData = 0x9a4 
('\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x 
00\x00\x00',) 
PHC size = 0x14 bytes ItemData = 0x9b8 
('\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x 
00\x00\x00',) 
RECON size = 0x14 bytes ItemData = 0x9cc 
('\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x 
00\x00\x00',) 
DETMASK size = 0x14 bytes ItemData = 0x9e0 
('\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x 
00\x00\x00',) 
TERMASK size = 0x14 bytes ItemData = 0x9f4 
('\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x 
00\x00\x00',) 
DATMASK size = 0x14 bytes ItemData = 0xa08 
('\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x 
00\x00\x00',) 
REFFILE size = 0x14 bytes ItemData = 0xa1c 
('\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x 
00\x00\x00',) 
INSTRUMENT size = 0x14 bytes ItemData = 0xa30 
('Smooth Phase\x00\x00\x00\x00\x00\x00\x00\x00',) 
SEQUENCE size = 0x2 bytes ItemData = 0xa44 
('\x00\x00',) 
SERIAL size = 0x14 bytes ItemData = 0xa46 
('\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x 
00\x00\x00',) 
PARTID size = 0x14 bytes ItemData = 0xa5a 
('\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x 
00\x00\x00',) 
XSTAGE size = 0x4 bytes ItemData = 0xa6e 
('\x00\x00\x00\x00',) 
YSTAGE size = 0x4 bytes ItemData = 0xa72 
('\x00\x00\x00\x00',) 
ZSTAGE size = 0x4 bytes ItemData = 0xa76 
('\x00\x00\x00\x00',) 
THETASTAGE size = 0x4 bytes ItemData = 0xa7a 
('\x00\x00\x00\x00',) 
SPECIALPHASE size = 0x14 bytes ItemData = 0xa7e 
('\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x 
00\x00\x00',) 
SPECIALDATA size = 0x14 bytes ItemData = 0xa92 
('\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x 
00\x00\x00',) 
FILTERLABEL size = 0x14 bytes ItemData = 0xaa6 
('520 nm\x00 B\x00se\x00\x00\x00\x00\x00\x00\x00\x00',) 
MAGLABEL size = 0x14 bytes ItemData = 0xaba 
('20X\x00nm\x00 B\x00se\x00\x00\x00\x00\x00\x00\x00\x00',) 
CAMERA_LABEL size = 0x14 bytes ItemData = 0xace 
('\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x 
00\x00\x00',) 
TUBE_LABEL size = 0x14 bytes ItemData = 0xae2 
('\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x 
00\x00\x00',) 
XPIXEL size = 0x4 bytes ItemData = 0xaf6 
('H\xe1\xfa>',) 
YPIXEL size = 0x4 bytes ItemData = 0xafa 
('H\xe1\xfa>',) 
ZSCALE size = 0x4 bytes ItemData = 0xafe 
('\x00\x00\x80?',) 
ORIGINX size = 0x2 bytes ItemData = 0xb02 
('\x00\x00',) 
ORIGINY size = 0x2 bytes ItemData = 0xb04 
('\x00\x00',) 
PZTSHIFT size = 0x4 bytes ItemData = 0xb06 
('\x00\x00\x00\x00',) 
MODTHRESH size = 0x4 bytes ItemData = 0xb0a 
('\x00\x00\x00\x00',) 
SMOOTH size = 0x4 bytes ItemData = 0xb0e 
('\x00\x00\x00\x00',) 
BADPIXEL size = 0x4 bytes ItemData = 0xb12 
('\xbf\x87*Y',) 
REGIONS size = 0x2 bytes ItemData = 0xb16 
('\x00\x00',) 
TERM size = 0x14 bytes ItemData = 0xb18 
('NONE\x00\x00\x00\x00TERMS\x00\x00\x00MEAN',) 
PIXELCOUNT size = 0x4 bytes ItemData = 0xb2c 
('\x00\x00\x00\x00',) 
VALLEY size = 0x4 bytes ItemData = 0xb30 
('\x00\x00\x00\x00',) 
PEAK size = 0x4 bytes ItemData = 0xb34 
('\x00\x00\x00\x00',) 
RMS size = 0x4 bytes ItemData = 0xb38 
('\x00\x00\x00\x00',) 
RA size = 0x4 bytes ItemData = 0xb3c 
('\x00\x00\x00\x00',) 
RS size = 0x4 bytes ItemData = 0xb40 
('\x00\x00\x00\x00',) 
CS size = 0x4 bytes ItemData = 0xb44 
('\x00\x00\x00\x00',) 
R1 size = 0x4 bytes ItemData = 0xb48 
('\x00\x00\x00\x00',) 
R2 size = 0x4 bytes ItemData = 0xb4c 
('\x00\x00\x00\x00',) 
A1 size = 0x4 bytes ItemData = 0xb50 
('\x00\x00\x00\x00',) 
MEAN size = 0x4 bytes ItemData = 0xb54 
('\x00\x00\x00\x00',) 
TERMS size = 0xe0 bytes ItemData = 0xb58 
('\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x 00\x00\x00\x00\x00',) 
DATA size = 0x64000 bytes ItemData = 0xc38 
MODENAME size = 0x14 bytes ItemData = 0x64c38 
('Smooth Phase\x00\x00\x00\x00\x00\x00\x00\x00',) 
TUBENAME size = 0x14 bytes ItemData = 0x64c4c 
('1X Body\x00hase\x00\x00\x00\x00\x00\x00\x00\x00',) 
RELAYNAME size = 0x14 bytes ItemData = 0x64c60 
('1X Relay\x00ase\x00\x00\x00\x00\x00\x00\x00\x00',) 
CAMERANAME size = 0x14 bytes ItemData = 0x64c74 
('1/2" CCD\x00ase\x00\x00\x00\x00\x00\x00\x00\x00',) 
OPERATOR size = 0x14 bytes ItemData = 0x64c88 
('125\x00 CCD\x00ase\x00\x00\x00\x00\x00\x00\x00\x00',) 
LOTNUMBER size = 0x14 bytes ItemData = 0x64c9c 
('I9W1R\x00CD\x00ase\x00\x00\x00\x00\x00\x00\x00\x00',) 
PARTNUMBER size = 0x14 bytes ItemData = 0x64cb0 
('39530\x00CD\x00ase\x00\x00\x00\x00\x00\x00\x00\x00',) 
XDECIMATION size = 0x2 bytes ItemData = 0x64cc4 
('\x01\x00',) 
YDECIMATION size = 0x2 bytes ItemData = 0x64cc6 
('\x01\x00',) 
FILTERWAVELENGT size = 0x4 bytes ItemData = 0x64cc8 
('\xb8\x1e\x05?',) 
OBJECTIVEMAG size = 0x4 bytes ItemData = 0x64ccc 
('\x00\x00\xa0A',) 
OBJECTIVENA size = 0x4 bytes ItemData = 0x64cd0 
('\xcd\xcc\xcc>',) 
TUBEMAG size = 0x4 bytes ItemData = 0x64cd4 
('\x00\x00\x80?',) 
RELAYMAG size = 0x4 bytes ItemData = 0x64cd8 
('\x00\x00\x80?',) 
CAMERAXPIXEL size = 0x4 bytes ItemData = 0x64cdc 
('\xcd\xcc\x1cA',) 
CAMERAYPIXEL size = 0x4 bytes ItemData = 0x64ce0 
('\xcd\xcc\x1cA',) 
size = 0x0 bytes ItemData = 0x64ce4 
('',) 
size = 0x0 bytes ItemData = 0x64ce4 
('',) 
size = 0x0 bytes ItemData = 0x64ce4 
('',) 
size = 0x0 bytes ItemData = 0x64ce4 
('',) 
size = 0x0 bytes ItemData = 0x64ce4 
('',) 
size = 0x0 bytes ItemData = 0x64ce4 
('',) 
size = 0x0 bytes ItemData = 0x64ce4 
('',) 
size = 0x0 bytes ItemData = 0x64ce4 
('',) 
size = 0x0 bytes ItemData = 0x64ce4 
('',) 
size = 0x0 bytes ItemData = 0x64ce4 
('',) 
C:\> 
  • So yes, 0x0C38 = 3128 bytes. I am extracting the image data at 3128 bytes to 320*320*4 + 3128 = 412728 bytes. That is how I get the data in the bitmap. The question is, where are the number measurements in the 3128 byte header or 172 byte footer? As in, the numbers on the PDF? – Alex Martin Aug 2 '17 at 19:29
  • please read and try to understand the answer so that the dialogue is meaningful the size of the data is hardcoded in the header here 00005be: 444154410000000000000000000000000000000000064001400100400600 DATA..................@.@..@.. it is as i said 0x64000 bytes as denoted in the last dword of item DATA THERE is also a pattern in the data each dwird in the data starts with 0x3c these might be floats defining a point as the datatype is surface please dissect my answer – blabb Aug 3 '17 at 2:51
  • I think I see what you are saying let me dig into it more I will update this, thanks. Do you mind taking a look at the 172 byte footer? I appreciate your expertise! – Alex Martin Aug 4 '17 at 15:07
  • there is no footer both the size and address of all items are hardcoded in the header i added a few lines of python that can print each of the item with its size address and data take a look and you should find out what the data is without any preconceived notion about its type like bmp,jpg etc the data has a patter as i said earlier each 4thbyte in the data appears to be 0x3c so you should find what it could mean – blabb Aug 5 '17 at 8:41
  • Hey blabb, you nailed this. I finally understand. I really appreciate your help. This will help me down the road immensely. As promised, you are the man! – Alex Martin Aug 14 '17 at 16:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.