public static boolean validImage(Image image){
  return (image != null && image.getWidth(null) > 0 && image.getHeight(null) > 0);
}

public static boolean validImage ( Image image ) { return ( image != null && image . getWidth ( null ) > 0 && image . getHeight ( null ) > 0 ) ; }
convenience method for testing the validity of an image .
