docs: public static void writeToPath(BitMatrix matrix, String format, Path file, MatrixToImageConfig config)
        throws IOException {
      BufferedImage image = toBufferedImage(matrix, config);
      if (!ImageIO.write(image, format, file.toFile())) {
        throw new IOException("Could not write an image of format " + format + " to " + file);
      }
    }