code: private Dimension getDefaultResolution() {
          if (getResolution() != null) {
              WebcamResolution res = WebcamResolution.valueOf(getResolution());
              return res.getSize();
          } else {
            return new Dimension(getWidth(), getHeight());   
          }
      }
docs: Returns the default resolution by name if provided, eg HD720, otherwise the width and height.