public byte[] createImage(Projection proj,int scaledWidth,int scaledHeight,int includedLayerMask){
  return createImage(proj,scaledWidth,scaledHeight,includedLayerMask,getBackground());
}

public byte [ ] createImage ( Projection proj , int scaledWidth , int scaledHeight , int includedLayerMask ) { return createImage ( proj , scaledWidth , scaledHeight , includedLayerMask , getBackground ( ) ) ; }
use the projectionpainter interface of the layers to create an image . this approach avoids some of the timing issues that the thread model of the mapbean and layers that seem to pop up from time to time . they are swing components , you know . they were designed to be part of a gui . so , this is a serialized , safe way to do things . uses the default background set in the imageserver .
