Closed nfogg closed 5 years ago
Hmm, I just tried on my phone and it's the correct orientation. Could be a simulator issue.
Sent with GitHawk
Change this textAttachment.image = UIImage(cgImage: cgImage, scale: scale, orientation: .up) to textAttachment.image = UIImage(cgImage: cgImage, scale: scale, orientation: image.imageOrientation)
Thanks @1640, your suggestion worked a treat!
@nathantannar4 I've created PR https://github.com/MessageKit/MessageInputBar/pull/25 with this small fix.
Closing now that PR #25 has been merged.
I am having difficulty handling image orientations correctly in the InputTextView. Images attached from the Photos library or from the devices camera can appear sideways or upside down in the InputTextView. This is happening in MessageInputBar version 0.4.1.
I am attaching images from a UIImagePickerController with the following code:
This problem can be reproduced using the ChatExample app in the simulator (iOS 12.1) with the following steps:
Note that the pasted image is upside down.