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
w2m
Posted - Mar 15 2014 : 08:09:26 Is there a way to estimate TIF file size for a given TIF_Compression without saving the file? EDIT: The TIF File has multi-frames.
ImageEnMView1.MIO.Params[i].TIFF_ZIPCompression := 2; { Maximum }
ImageEnMView1.MIO.Params[i].TIFF_Compression := ioTIFF_G4FAX;
William Miller
5 L A T E S T R E P L I E S (Newest First)
w2m
Posted - Mar 15 2014 : 11:54:00 After some more testing I found that the size of the stream produces the same result as getting the filesize from a temporary file.
The problem I had was, that a call to updatestatusbar which updated the filesize on a statusbar overwrote the filesise with the filesize of the original file unprocessed tif file which is why the filesize did not change.
The code I posted earlier works just fine.
William Miller
w2m
Posted - Mar 15 2014 : 10:32:35 I tried this, but the result is the same, regardless of the compression:
var
iMemoryStream: TMemoryStream;
iFileSize: Int64;
begin
{Save all the frames to a stream }
ImageEnMView1.MIO.SaveToStreamTIFF(iMemoryStream);
iFileSize := iMemoryStream.Size;
dxStatusBar1.Panels[7].Text := FormatByteSize(iFileSize);
end;
So my guess is, it will not work.
Maybe I'll try saving the file to a temp folder...
William Miller
Uwe
Posted - Mar 15 2014 : 10:02:40 Bill
Never tried it, but I can't see any reason why that shouldn't be possible. Here's an ASP.NET solution for example: