code: public static BufferedImage createBufferedImage(int width, int height,
  			String imageFormat) {
  
  		int imageType;
  
  		switch (imageFormat.toLowerCase()) {
  		case IMAGE_FORMAT_JPG:
  		case IMAGE_FORMAT_JPEG:
  			imageType = BufferedImage.TYPE_INT_RGB;
  			break;
  		default:
  			imageType = BufferedImage.TYPE_INT_ARGB;
  		}
  
  		BufferedImage image = new BufferedImage(width, height, imageType);
  
  		return image;
  	}
docs: Create a buffered image for the dimensions and image format
  
  @param width
  image width
  @param height
  image height
  @param imageFormat
  image format
  @return image