Download DBTool User Manual

Transcript
DBTool User Manual
Age:
City:
Date:
Photo:
26
’New York’
7.3123e+005
[1x5099 double]
>>
We can see xs.Photo is a 1x5099 double array, each double word only contains a byte.
Actually, it has a picture file named Abra.gif embedded. The file Abra.gif is 1165 bytes,
other bytes are OLE information inserted by Access.
We can find the file content of Abra.gif by searching the string “GIF8”, this is the beginning
string of an ordinary GIF file.
>> pack = xs.Photo;
>> offset = findstr(pack, ’GIF8’)
offset =
184
>>
And the 4 bytes before the string “GIF8” is the length of the file:
>> pack(184-4:184-1)
ans =
141
4
0
0
>>
So the length of the file can be calculated:
>> len=141+256*4
len =
1165
>>
Now we can extract the content of the file, and save it to disk:
>>
>>
>>
>>
>>
dat = pack(offset:offset+len);
fout = fopen(’temp.gif’,’wb’);
fwrite(fout, dat);
fclose(fout);
21