How to save a large fractal image with the least possible memory footprint?
I'm currently working on fractals, and when it comes to fractals, detail is a must. However, since I am using Java, I run out of heap space once I get past about 2000x2000px. Yes, I could increase the heap space, but that's not a very elegant solution.
So my question is: Are there any image formats where I could write the pixel data as I calculate开发者_运维问答 it? If there are multiple, which ones are the easiest to understand? (The Java libraries only support writing whole images at a time, from what I know).
Thanks!
I think the best way to accomplish this is to break your image up into small square regions and render each individually. Then try to recombine the tiles into one large image as per the suggestions in this thread.. The answer involves using JAI to reassemble the tiles in a streaming fashion rather than loading everything in memory at once.
Well, there's always BMP. You can find multiple simple references to the BMP file format at wotsit.
精彩评论