mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-06 21:33:08 +00:00
Fix orientation image
This commit is contained in:
parent
57c8efe310
commit
9f3aeb63ac
1 changed files with 2 additions and 1 deletions
|
|
@ -315,7 +315,8 @@ struct ChatBubbleView: View {
|
|||
if let imageProperties = CGImageSourceCopyPropertiesAtIndex(imageSource, 0, nil) as Dictionary? {
|
||||
let pixelWidth = imageProperties[kCGImagePropertyPixelWidth] as? CGFloat
|
||||
let pixelHeight = imageProperties[kCGImagePropertyPixelHeight] as? CGFloat
|
||||
return (pixelWidth ?? 0, pixelHeight ?? 0)
|
||||
let orientation = imageProperties[kCGImagePropertyOrientation] as? Int
|
||||
return orientation != nil && orientation == 6 ? (pixelHeight ?? 0, pixelWidth ?? 0) : (pixelWidth ?? 0, pixelHeight ?? 0)
|
||||
}
|
||||
}
|
||||
return (0, 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue