rewrote the save method for PGM to avoid long String related performance issues, added nearestNeighborResize, renamed resize boxResize, updated Test