Issue confirmed. This part is not written by me, and never touched for years. I do not know why this part is commented out.
My guess is someone tried to implement transparency of PPM... and has not finished it.
I just removed transparency related code and recovered Ppm.save. Tested load+save of a ppm file.