Skip to content

Commit

Permalink
Merge pull request onevcat#545 from onevcat/fix/image-orientation
Browse files Browse the repository at this point in the history
Consider image orientation when applying filter
  • Loading branch information
onevcat authored Dec 20, 2016
2 parents 402c933 + 3c0e50c commit 944323e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/Filter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ extension Kingfisher where Base: Image {
#if os(macOS)
return fixedForRetinaPixel(cgImage: result, to: size)
#else
return Image(cgImage: result)
return Image(cgImage: result, scale: base.scale, orientation: base.imageOrientation)
#endif
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/Image.swift
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ extension Kingfisher where Base: Image {
#if os(macOS)
let result = outContext.makeImage().flatMap { fixedForRetinaPixel(cgImage: $0, to: size) }
#else
let result = outContext.makeImage().flatMap { Image(cgImage: $0) }
let result = outContext.makeImage().flatMap { Image(cgImage: $0, scale: base.scale, orientation: base.imageOrientation) }
#endif
guard let blurredImage = result else {
assertionFailure("[Kingfisher] Can not make an blurred image within this context.")
Expand Down

0 comments on commit 944323e

Please sign in to comment.