Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
donaldadams1951
Posted - Mar 12 2012 : 22:32:06 I had a previous post about corrupt TIFFs. I used similar code to the following...
"ImageEn can test if a file is corrupted, but only after loaded (or tried to load) it. Example:
ImageEnView1.IO.LoadFromFile('TIFFTest.tif'); if ImageEnView1.IO.Aborting then ...corrupted..."
The only problem is that if the image file has a size of zero bytes it does not get marked as corrupt. Any ideas?
1 L A T E S T R E P L I E S (Newest First)
fab
Posted - Mar 13 2012 : 00:45:59 I cannot replicate this (at least using 4.x versions). Please try:
with TFileStream.Create('empty.tiff', fmCreate) do
Free();
ImageEnView1.IO.LoadFromFile('empty.tiff');
if ImageEnView1.IO.Aborting then
showmessage('aborting');