Look at my modifications of createScaledBytes() in BitmapUtil. There, the image that will be transferred to the receiver is being rotated if necessary.