corrected segfault on error displaying, fix encoding error
fix replace photo
fix rotation error
store rotation angle