Răsfoiți Sursa

Merge pull request #1732 from FuYouFang/fang

Modify the wrong code comment
Wei Wang 4 ani în urmă
părinte
comite
1b22993285
2 a modificat fișierele cu 5 adăugiri și 10 ștergeri
  1. 3 8
      Sources/Image/Image.swift
  2. 2 2
      Sources/Image/ImageProcessor.swift

+ 3 - 8
Sources/Image/Image.swift

@@ -228,18 +228,13 @@ extension KingfisherWrapper where Base: KFCrossPlatformImage {
         return animatedImageData
     }
 
-    /// Returns a data representation for `base` image, with the `format` as the format indicator.
-    ///
-    /// - Parameter format: The format in which the output data should be. If `unknown`, the `base` image will be
-    ///                     converted in the PNG representation.
-    ///
-    /// - Returns: The output data representing.
-
     /// Returns a data representation for `base` image, with the `format` as the format indicator.
     /// - Parameters:
     ///   - format: The format in which the output data should be. If `unknown`, the `base` image will be
-    ///   converted in the PNG representation.
+    ///             converted in the PNG representation.
     ///   - compressionQuality: The compression quality when converting image to a lossy format data.
+    ///
+    /// - Returns: The output data representing.
     public func data(format: ImageFormat, compressionQuality: CGFloat = 1.0) -> Data? {
         return autoreleasepool { () -> Data? in
             let data: Data?

+ 2 - 2
Sources/Image/ImageProcessor.swift

@@ -36,7 +36,7 @@ import AppKit
 /// - image: Input image. The processor should provide a way to apply
 ///          processing on this `image` and return the result image.
 /// - data:  Input data. The processor should provide a way to apply
-///          processing on this `image` and return the result image.
+///          processing on this `data` and return the result image.
 public enum ImageProcessItem {
     
     /// Input image. The processor should provide a way to apply
@@ -44,7 +44,7 @@ public enum ImageProcessItem {
     case image(KFCrossPlatformImage)
     
     /// Input data. The processor should provide a way to apply
-    /// processing on this `image` and return the result image.
+    /// processing on this `data` and return the result image.
     case data(Data)
 }