Example #1
0
  public static GreyImage loadPGM(String filename) throws FileNotFoundException, IOException {
    PGMFileIO file = new PGMFileIO(filename);
    file.readPGM();

    GreyImage res = new GreyImage(file.getSizeX(), file.getSizeY(), file.getData());
    return res;
  }
Example #2
0
  public void save(String filename) throws IOException {
    PGMFileIO file = new PGMFileIO(filename);

    file.writePGM(this.dimX, this.dimY, this.data);
  }