A few days ago I had this exact problem. This is the solution I implemented.
You need a HexEditor that can SAVA AS ASCII. for example HexProbe
You also need a text editor to REPLACE a string by another in the resulting ASCII file.
// Generated by Hexprobe Version 4.2
// http://www.hexprobe.com/
//
// Original File: SEARCH.GIF
// Data Offset: 0000000000 / $0000000000
// Data Length: 0000004101 / $0000001005 (bytes)
// LENGTH OF ARRAY 4101
Use Write instead of WriteLn (avoid CR+LF at the end)
if FileExists(App_Path+'Search.gif') then
begin
*
* No problems
*
end else
begin // create it first
gif_exists := false;
s:='';
for i:= 1 to 4101 do s:=s+chr(MyGIFText[i]);
assignfile(f,App_Path+'Search.gif');
rewrite(f);
write(f,s);
closefile(f);
*
* No problems...
*
end;
end;
{Result of HeProbe SAVE AS and the text editor's Replace: }
MyDBFText : Array[1..4101] of byte = (
$47, $49, $46, $38, $39, $61, $63, $00, $34, $00, $87, $00, $00, $00, $00, $00,
$00, $00, $33, $00, $00, $66, $00, $00, $99, $00, $00, $CC, $00, $00, $FF, $33,
$00, $00, $33, $00, $33, $33, $00, $66, $33, $00, $99, $33, $00, $CC, $33, $00,
*
*
};
was originally
0X47, 0X49, 0X46, 0X38, 0X39, 0X61, 0X63, 0X00, 0X34, 0X00, 0X87, 0X00, 0X00, 0X00, 0X00, 0X00,
0X00, 0X00, 0X33, 0X00, 0X00, 0X66, 0X00, 0X00, 0X99, 0X00, 0X00, 0XCC, 0X00, 0X00, 0XFF, 0X33,
0X00, 0X00, 0X33, 0X00, 0X33, 0X33, 0X00, 0X66, 0X33, 0X00, 0X99, 0X33, 0X00, 0XCC, 0X33, 0X00,
*
*
Changed all '0X' into '$' that's all...
Eitan Gilboa
June 17th 2008