Menu

#2 Drop xxx.img doesn't work

open
nobody
None
5
2014-08-27
2003-03-03
Anonymous
No

LoadDropFile fails to recognize xxx.img files because it
checks the wrong file for file size:

TMainForm.LoadDropFile:
[...]
if (lExt ='.IMG') or (lExt ='.HDR') then
begin
lHdrName :=ExtractFilePath(lFilename)
+ParseFileName(ExtractFileName(lFilename))+'.hdr';
if fileexists(lHdrName) then
begin
// AssignFile(lf, lFIlename); Bug: GW 2003-03-03
AssignFile(lf, lHdrName); // GW Replacement
Reset(lf);
lLen := filesize(lf);
closefile(lf);
if lLen=(348) then
begin
CreateMDIChild(lHdrName,true,false,false,false);
exit;
end;
end;
end; //try analyze format

grahampub@wideman-one.com

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.