Просмотр исходного кода

Merge pull request #2396 from onevcat/fix/thumbnail-image-orientation

Fix ThumbnailImageDataProvider image orientation issue
Wei Wang 8 месяцев назад
Родитель
Сommit
84793a8fb5
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      Sources/General/ImageSource/ImageDataProvider.swift

+ 2 - 1
Sources/General/ImageSource/ImageDataProvider.swift

@@ -245,7 +245,8 @@ public struct ThumbnailImageDataProvider: ImageDataProvider {
                 
                 let options = [
                     kCGImageSourceThumbnailMaxPixelSize: maxPixelSize,
-                    kCGImageSourceCreateThumbnailFromImageAlways: alwaysCreateThumbnail
+                    kCGImageSourceCreateThumbnailFromImageAlways: alwaysCreateThumbnail,
+                    kCGImageSourceCreateThumbnailWithTransform: true
                 ]
                 
                 guard let thumbnailRef = CGImageSourceCreateThumbnailAtIndex(imageSource, 0, options as CFDictionary) else {