Sorry I may cross post this as I see fit.
I think there might be a slight speedup over netpbm with imagemagick.
I do see a minor problem... the 90 degree rotations are backwards. There should be a different call in the rotate_photo.php file to swap if using imagemagick vs netpbm.