Hi, I am chiming in a little late because I was swamped with other things. I am involved in a couple of Open Source GIS projects where we handle single image which can be couple of gigabytes but also we work with large mosaics and pyramids.
I am not sure I understood 100% your problem, but what I can say is: 1>Never use FileChannel based ImageIO streams on windows with big images since they map the all image at once and this causes a lot of problems as you saw. I have developed some replacement for this combining RandomAccessFile and buffering, performances in most operations are comparable to the mapped streams but there are no problems with swap files on Windows. 2>I really do not think you should approach this problem in a Java2d pure manner, which means in a pure immediate mode. I am pretty sure you should mix a good old JAI+ImageIO approach to manage the I/O on a tile base as wewll as some good Java2d to draw your huge image tile by tile. In GIS systems we handle images that virtually are very very big (I have reached 20 gigabytes) by doing mosaics which is pretty easy to implement with JAI and ImageIO. I think what you really need is an enhancement of the JAI TileCache to back a special tiledimage that simply write down to disk tiles that cannot live in memory. This way you avoid OOM problems and you can handle images which are really really big with very good performances. This technique is called 2 Levels Tile Caching and it is basically behind engines like Google Earth, Google Map and worldwind. It is easier to develop than to describe 8especially with my bad english :-) ). Let me know if you re interested in something like that. Regards, Simone. ------------------------------------------------------- Eng. Simone Giannecchini President/CEO GeoSolutions http://www.geo-solutions.it Via Carignoni 51 550141 Camaiore (LU) Italy Mobile: +39 333 81 28928 ------------------------------------------------------- On 2/22/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Let me outline what you'd have to do: 1. Create a memory mapped file. What you get is a ByteBuffer instance. 2. Create a DataBuffer subclass, which's getElem() and setElem() methods delegate to the ByteBuffer's get() and put() methods. 3. Create a BufferedImage that wraps the above DataBuffer You could play with the actual transfer type by wrapping the ByteBuffer into an IntBuffer or so. Shouldn't be too hard. [Message sent by forum member 'roman_kennke' (roman_kennke)] http://forums.java.net/jive/thread.jspa?messageID=204891 =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
-- ------------------------------------------------------- Eng. Simone Giannecchini President /CEO GeoSolutions http://www.geo-solutions.it ------------------------------------------------------- =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".