code: public static com.github.bordertech.wcomponents.Image createThumbnail(final InputStream is,
  			final String name,
  			final Dimension scaledSize, final String mimeType) {
  		final Dimension scale = scaledSize == null ? THUMBNAIL_SCALE_SIZE : scaledSize;
  
  		// Generate thumbnail for image files
  		if (is != null && mimeType != null && (mimeType.equals("image/jpeg") || mimeType.equals(
  				"image/bmp")
  				|| mimeType.equals("image/png") || mimeType.equals("image/gif"))) {
  			byte[] bytes = createImageThumbnail(is, scale);
  			if (bytes != null) {
  				return new BytesImage(bytes, "image/jpeg", "Thumbnail of " + name, null);
  			}
  		}
  
  		// Use default thumbnail depending on mime type
  		com.github.bordertech.wcomponents.Image image = handleDefaultImage(mimeType, name, scale);
  		return image;
  	}
docs: This method takes a input document (represented by an {@link InputStream}) and returns a byte[] representing a
  JPEG "thumb nail" of a given page of the document. It can do this for a limited number of input document
  "types"images.
  
  @param is The {@link InputStream} representing the input document.
  @param name The name of the file from which the input document was sourced.
  @param scaledSize the size to which the given <em>image</em> is to be scaled, null for default
  @param mimeType the mime type
  @return a byte[] array representing a JEPG thumb nail of the specified page within the Office document or Image.