code: public static String findMimeType( File imgFile ) {
  
  		String result;
  		String name = imgFile.getName().toLowerCase();
  		if( name.endsWith( ".jpg" ) || name.endsWith( ".jpeg" ))
  			result = MIME_JPG;
  		else if( name.endsWith( ".gif" ))
  			result = MIME_GIF;
  		else if( name.endsWith( ".png" ))
  			result = MIME_PNG;
  		else if( name.endsWith( ".svg" ))
  			result = MIME_SVG;
  		else
  			result = MIME_BINARY;
  
  		return result;
  	}
docs: Finds the MIMe type associated with an image (based on the file extension).
  @param imgFile an image file (not null)
  @return a non-null string, matching a MIME type