Auto rotate event listener

image.put event listener automagically rotating and flipping images to make the orientation correct before storing it.