In my eclipse-rcp application I need to create an image with dimensions 30000x10000 px or more. This image is NatTable representation. Using standard image creation approach, it fails with different problems: OutOfMemory, SWTError - IllegalArgument or my PC stops responding (btw, its windows 7, 64bit, 4 RAM - client have much slower laptops, but the picture is still needs to be created). Here is a code snippet:
private Image getNattableImageRepresentation(final Display display) {
        final Rectangle totalGridArea = getTotalGridArea(); //this returns Rectangle(0,0,30000,10000)
        setGridLayerSize(totalGridArea);
        final Image nattableImage = new Image(display, totalGridArea);
        final GC nattableGC = new GC(nattableImage);
        gridLayer.getLayerPainter().paintLayer(gridLayer, nattableGC, 0, 0, totalGridArea, configRegistry);//nattable API, which draws an image into a specified gc
        restoreGridLayerState();
        return nattableImage;
    }
    return null;
}
Are there any tricks to create such huge images or may be API? Is Java Advanced Imaging Api suitable for this purpose?
Any suggestions are appreciated.
 
     
    