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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 TIETIFFHandler - “Out Of Memory” error message

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
AndNit Posted - Feb 04 2024 : 08:33:45
message translated by Google Translate

Hello everything is fine?

I need help with a process that seems simple, but in some files it has given me a lot of work. Our system opens Tif documents and our process works very well using TIETIFFHandler, I use TIETIFFHandler to manipulate these files, as it is the way with the best time performance, to open, manipulate and save large tif files (596 MB / 1,381 images), However, in some specific cases, TIETIFFHandler is unable to open the files and displays an “Out Of Memory” error message.

To solve this problem, if I change the file opening to ImageEnMView1.LoadFromFileOnDemand, the process does not present any errors, but editing these files becomes a very slow process, including new pages and saving the entire file again for example. Is there any way to handle these files safely and quickly?

The way I do it today is this:

Tiff : TIETIFFHandler;

//here I pass the path of the tif file to the procedure
LoadTiffFile(CaminhoImgDoc)

//procedure to open the file	
procedure TfrmConsCert.LoadTiffFile(const Filename: string);
var
  I, idx: Integer;
begin
  if IEFilenameInExtensions( Filename, '*.tif;*.tiff' ) = False then
    exit;
  try
     // in some files, here it shows the error "Out of Memory"
     Tiff.ReadFile( FileName );
     ImageEnMView1.LockUpdate();

     ImageEnMView1.Clear;
     for I := 0 to Tiff.GetPagesCount - 1 do begin
       idx := ImageEnMView1.AppendImage();
       ImageEnMView1.ImageID[ idx ] := 99;  
     end;
     ImageEnMView1.SelectedImage := 0;
     ImageEnMView1.UnlockUpdate();
  except
     \\this way, files with an "Out of Memory" error will open normally
     ImageEnMView1.LoadFromFileOnDemand(FileName);
  end;
end;
8   L A T E S T    R E P L I E S    (Newest First)
AndNit Posted - Mar 04 2024 : 09:14:54
email sent

Thanks
AndNit Posted - Feb 19 2024 : 16:33:22
Of course, I will send it tomorrow, as soon as I arrive at the Office.

Anyway, the indication to use InsertTIFFImageFile worked very well, I implemented it on the client today and it seems to be working well.
xequte Posted - Feb 19 2024 : 13:29:13
Hi

We have an update that should help with this. Can you email me for it?

Nigel
Xequte Software
www.imageen.com
xequte Posted - Feb 10 2024 : 15:10:17
Hi

I'll let you know once we complete our investigation.

TImageEnMView cannot insert pages without saving the entire content, you would need to use one of the other TIFF methods to perform the insertion, such as:

http://www.imageen.com/help/InsertTIFFImageFile.html

Nigel
Xequte Software
www.imageen.com
AndNit Posted - Feb 09 2024 : 08:14:27
Thanks Nigel Do you think we can find a solution to this problem, or a palliative? We are increasingly experiencing this type of problem among our customers.
For now, if you can help me, how do I open a document using loadfromfileondemand, insert 10 more pages into the same document and update the original file without having to save the entire file again? I thank.
xequte Posted - Feb 07 2024 : 19:49:12
Hi

I can reproduce the memory issues and will see if there are any improvements we can make there.

Nigel
Xequte Software
www.imageen.com
AndNit Posted - Feb 05 2024 : 06:14:52
message translated by Google Translate

hey,

Yes, I do, and they are not always large files, but most of them are. Where can I send?

It is worth remembering that the error only occurs using TIETIFFHandler.
xequte Posted - Feb 04 2024 : 15:31:30
Hi

Do you have some samples of the very large tiff files that cause "Out of Memory" errors?

Nigel
Xequte Software
www.imageen.com