 |
Asynchronous Display of Tiled Images This source code demonstrates a swing component that will display a RenderedImage?. In contrast to DisplayJAI? it computes each tile in the visible area on a separate thread from the EventDispatcher? making it more pleasant to use in a JScrollPane?. If your image is not tiled this class is probably not worth the effort, use DisplayJAI? instead. If on the other hand your image is tiled and at the end of a compute heavy render chain then this method can help improve responsiveness.
Rendered Image Proxy This source code creates a "proxy" for a Rendered Image, it uses a soft reference to the actual image to allow it to be garbage collected, when a reference is made to the image again it is reloaded. This class was originally written to allow a large number of Jpegs to be placed in a render chain ending in a mosaic without actually needing them all to be resident in memory at once. The jpegs are loaded/reloaded if the relevant part of the mosaic is actually rendered. How well this class will work for you depends on your specific requirements, it worked for me. Obviously there is a performance hit every time the image needs to be reloaded.
Discussion about JAI_SampleCode
|