It doesn't look like the current solution will work though? Looks to me like it will never rotate the original image, and only rotate the thumbnail we display.  How is the receiver supposed to display it properly?