move the sub changing images inplace to ImageMunger
add a trim-edges sub that does something similar to the "-trim" option of ImageMagick -- except that it uses the pixel at the middle of edges to be the color of that side.