Skip to content

Commit

Permalink
Merge pull request #37 from andr3a88/master
Browse files Browse the repository at this point in the history
[Merged but not tested] Fix Photos that doesn't fill the view
  • Loading branch information
jberlana committed Oct 16, 2015
2 parents 62eeeab + 9e6c5ec commit c596c40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions KenBurns/JBKenBurnsView.m
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ - (float)getResizeRatioFromImage:(UIImage *)image width:(float)frameWidth height
{
heightDiff = frameHeight - image.size.height;

if (widthDiff > heightDiff)
if (widthDiff < heightDiff)
resizeRatio = frameWidth / image.size.width;
else
resizeRatio = self.bounds.size.height / image.size.height;
Expand All @@ -350,7 +350,7 @@ - (float)getResizeRatioFromImage:(UIImage *)image width:(float)frameWidth height
{
heightDiff = frameHeight - image.size.height;

if (widthDiff > heightDiff)
if (widthDiff < heightDiff)
resizeRatio = frameWidth / image.size.width;
else
resizeRatio = frameHeight / image.size.height;
Expand Down

0 comments on commit c596c40

Please sign in to comment.