alex.huo 7 лет назад
Родитель
Сommit
2e0cc320b3
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      Sources/Image/ImageDrawing.swift

+ 4 - 1
Sources/Image/ImageDrawing.swift

@@ -560,7 +560,10 @@ extension KingfisherWrapper where Base: CGImage {
     public func resize(to size: CGSize) -> CGImage {
         let alphaInfo = base.alphaInfo.rawValue & CGBitmapInfo.alphaInfoMask.rawValue
         var hasAlpha = false
-        if alphaInfo == CGImageAlphaInfo.premultipliedLast.rawValue || alphaInfo == CGImageAlphaInfo.premultipliedFirst.rawValue || alphaInfo == CGImageAlphaInfo.first.rawValue || alphaInfo == CGImageAlphaInfo.last.rawValue {
+        if alphaInfo == CGImageAlphaInfo.premultipliedLast.rawValue
+            || alphaInfo == CGImageAlphaInfo.premultipliedFirst.rawValue
+            || alphaInfo == CGImageAlphaInfo.first.rawValue
+            || alphaInfo == CGImageAlphaInfo.last.rawValue {
             hasAlpha = true
         }