if (input == null) throw new IllegalStateException("input is null");
  public float getAspectRatio(int imageIndex)    throws IOException  {    return (float) (getWidth(imageIndex) / getHeight(imageIndex));  }