Explorar el Código

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

Fix ThumbnailImageDataProvider image orientation issue
Wei Wang hace 8 meses
padre
commit
84793a8fb5
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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 {