ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 TImageEnMIO.SaveToFileTIFF randomly working
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

aleatprog

122 Posts

Posted - Oct 24 2020 :  11:34:29  Show Profile  Reply
Occasionally, the usage of TImageEnMIO.SaveToFileTIFF(FileName, True) or TImageEnMIO.SaveToFile(FileName, ioTIFF, True) generates an incomplete, 174 byte sized TIF File which can't be opened.

Curious: Without closing the application and after saving the TImageEnMView Bitmaps in other formats (e.g. JPG, PDF) the saving in TIF format finally succeeds.

Has anyone made a similar experience with TImageEnMIO.SaveToFileTIFF and got a workaround to fix this behaviour?

Al

ImageEn 9.2
Delphi 10.3

xequte

38180 Posts

Posted - Oct 25 2020 :  01:11:55  Show Profile  Reply
Hi Al

Sounds like some kind of drive caching issue. Does it only happen on a particular drive? What about when you test on an external hard drive?



Nigel
Xequte Software
www.imageen.com
Go to Top of Page

aleatprog

122 Posts

Posted - Oct 25 2020 :  07:37:28  Show Profile  Reply
I made a quite simple test with some buttons, each to save the TImageEnMView bitmaps in a different format (TIF, JPG).

After opening the app and loading a few bitmaps in TImageEnMView, saving one or more of them as TIF fails. If then (with the same app still open, therefore the same hardware conditions) I save the bitmaps as JPG (works correctly) and retry to save them as TIF, the TIF saving succeeds. It seems as if saving a single bitmap as JPG corrects something. In fact, if TImageEnMView contains only one bitmap, TIF saving works correctly right from the start.

Al
Go to Top of Page

xequte

38180 Posts

Posted - Oct 25 2020 :  16:08:08  Show Profile  Reply
Hi Al

Please email me the source for this demo.



Nigel
Xequte Software
www.imageen.com
Go to Top of Page

xequte

38180 Posts

Posted - Oct 25 2020 :  23:04:07  Show Profile  Reply
I tried to reproduce as follows, but did not experience any issues:

  ImageEnMView1.AppendImage('D:\im.jpg');
  ImageEnMView1.AppendImage('D:\alpha.png');
  ImageEnMView1.AppendImage('D:\im2.jpg');
  ImageEnMView1.AppendImage('D:\im3.jpg');
  ImageEnMView1.AppendImage('D:\wic.bmp');

  for I := 1 to 50 do
  begin
    fn := 'D:\test'+IntToStr(Random(10000))+'.tif';
    ImageEnMView1.MIO.SaveToFileTIFF( fn );
  end;


Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: