Skip to content

Commit

Permalink
Consider screen scale when pre-resizing GIF frames
Browse files Browse the repository at this point in the history
  • Loading branch information
onevcat committed Jan 21, 2019
1 parent a50e979 commit 5011a21
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/Views/AnimatedImageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,11 @@ open class AnimatedImageView: UIImageView {
private func reset() {
animator = nil
if let imageSource = image?.kf.imageSource {
let targetSize = bounds.scaled(UIScreen.main.scale).size
let animator = Animator(
imageSource: imageSource,
contentMode: contentMode,
size: bounds.size,
size: targetSize,
framePreloadCount: framePreloadCount,
repeatCount: repeatCount,
preloadQueue: preloadQueue)
Expand Down

0 comments on commit 5011a21

Please sign in to comment.