@Override
  public boolean canDecodeInput(Object input) throws IOException {
    if (!(input instanceof ImageInputStream stream)) {
      return false;
    }
    try {
      final ImageFormat imageFormat = Imaging.guessFormat(new MyByteSource(stream));
      if (myFormats.contains(imageFormat)) {
        myFormat.set(imageFormat);
        return true;
      }
      return false;
    }
    catch (ImageReadException e) {
      throw new IOException(e);
    }
  }
@Override
  public boolean canDecodeInput(Object input)