code: public static String[] getFormatNames() {
  
          JsArrayString formatNames = nativeGetFormatNames();
          if ((formatNames == null) || (formatNames.length() == 0)) {
              return null;
          }
          String[] result = new String[formatNames.length()];
          for (int i = 0; i < formatNames.length(); i++) {
              result[i] = formatNames.get(i);
          }
          return result;
      }
docs: Returns the available image format names for gallery widget mode.<p>
  
  @return the available image format names