This is a problem that sooner or later will have to be addressed. Currently 
the whole image is stored in a byte array that is stored in Image. It's not 
terribly difficult to support a temp file but the big question is when to 
delete it. Web servers may also have problems with temp files. I'll think 
about it this weekend.

Paulo

----- Original Message ----- 
From: "Nan Null" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, March 13, 2007 8:49 PM
Subject: [iText-questions] Out of Memory with Large Image



I want to be able to process a large tiff image (50 M).  The processing 
steps include retrieving the number of pages and split out page by page into 
PDF.

The problem is that I see ByteArrayOutputStream is used in many places, 
including the RandomAccessFileOrArray class.  This resulted in out of 
memory.  I wonder how I can change (or patch the code) so that a truly 
random access file is used instead of byte array, or at least it's smart 
enough to switch between the two when the data size is under certain size.

This does not fix the problem.  Byte array in the TiffImage class and other 
supported class must also be changed to use input/output/random istream.

Someone from the "know" please help.  I am willing to do some coding and 
submit the change if given some instruction (hopefully it's in a doable time 
frame).


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to