Skip to content

Commit

Permalink
Revert skip-png-decompression feature
Browse files Browse the repository at this point in the history
  • Loading branch information
kean committed May 31, 2024
1 parent df104f1 commit 6c25428
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions Sources/Nuke/Processing/ImageDecompression.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,7 @@ import Foundation

enum ImageDecompression {
static func isDecompressionNeeded(for response: ImageResponse) -> Bool {
guard response.container.type != .png else {
// Attempting to decompress a `.png` image using
// `prepareForReuse` results in the following error:
//
// [Decompressor] Error -17102 decompressing image -- possibly corrupt
//
// It's also, in general, inefficient and unnecessary.
return false
}
return isDecompressionNeeded(for: response.image) ?? false
isDecompressionNeeded(for: response.image) ?? false
}

static func decompress(image: PlatformImage, isUsingPrepareForDisplay: Bool = false) -> PlatformImage {
Expand Down

0 comments on commit 6c25428

Please sign in to comment.