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

Ignoring resizing animated frame when size is zero

xspyhack 6 лет назад
Родитель
Сommit
7cb1b1a965
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      Sources/Views/AnimatedImageView.swift

+ 2 - 1
Sources/Views/AnimatedImageView.swift

@@ -503,9 +503,10 @@ extension AnimatedImageView {
                 kCGImageSourceThumbnailMaxPixelSize: max(size.width, size.height)
             ]
 
+            let resize = needsPrescaling && size != .zero
             guard let cgImage = CGImageSourceCreateImageAtIndex(imageSource,
                                                                 index,
-                                                                needsPrescaling ? options as CFDictionary : nil) else {
+                                                                resize ? options as CFDictionary : nil) else {
                 return nil
             }