if ( sourceNoiseMap == null
|| destImageCafe == null
|| sourceNoiseMap.getWidth () <= 0
|| sourceNoiseMap.getHeight () <= 0
|| gradient.getGradientPointCount () < 2)
throw new ExceptionInvalidParam ("Invalid Parameter in RendererImage");
int width = sourceNoiseMap.getWidth ();
int height = sourceNoiseMap.getHeight ();
// If a background image was provided, make sure it is the same size the
// source noise map.
if (backgroundImage != null)
if ( backgroundImage.getWidth () != width || backgroundImage.getHeight () != height)
throw new ExceptionInvalidParam ("Invalid Parameter in RendererImage");
// Create the destination image. It is safe to reuse it if this is also the
// background image.
if (destImageCafe != backgroundImage)