jberlana/JBKenBurns

Photos with lower-res don't fill view on iPhone 6 Plus

andr3a88 opened this issue · 4 comments

I'm have problems with low-resolution image (about 600px width, in lanscape mode ratio image > 1) that leaves black spaces on top and bottom. I'm using the last version on Github.

Example
ios simulator screen shot 05 giu 2015 10 55 13

I had this problem too, I juste reverted the two tests in gestResizeRatioFromImage:width:height on line 327 and 353 from

if (widthDiff > heightDiff)

to

if (widthDiff < heightDiff)

My JBKenBurs class reaches 343 lines. You mean inside "Wider than screen" or "No wider than screen"?
I tried many times but sometimes the problem comes back.

 // Wider than screen
if (image.size.width > frameWidth)
{
   ...
}
// No wider than screen
else
{
    ...
}

I apologize for not figuring out how to actually fix this in GitHub but these three lines do everything getResizeRatioFromImage:width:height: fails to do in 50:

float hRatio = frameHeight / image.size.height;
float wRatio = frameWidth / image.size.width;

return hRatio > wRatio ? hRatio : wRatio;

simulator screen shot 15-jan-2016 6 43 06 pm
simulator screen shot 15-jan-2016 6 43 09 pm
simulator screen shot 15-jan-2016 6 43 13 pm

Same issue here...