Add pgm conversion script