mbcharbonneau / UIImage-Categories

🛠 A fork of Trevor Harmon's UIImage category methods, updated for the latest versions of iOS.
http://vocaro.com/trevor/blog/2009/10/12/resize-a-uiimage-the-right-way/
MIT License
492 stars 152 forks source link

crop resized images that get bigger beyond the bounds parameter #17

Closed qixotic closed 8 years ago

qixotic commented 10 years ago

This can happen specifically when using UIViewContentModeScaleAspectFill, and at least one of the dimensions is larger than the specified bounds. Since it's aspect fill, this center crops the resized image to the given bounds' dimensions.

mbcharbonneau commented 8 years ago

Apologies for leaving this open for so long! As you can guess, I no longer use this code in any of my current projects. If you’re still interested in this PR, could you verify it’s compatible with Xcode 7 and provide a test image to demonstrate the issue? Thanks, and I apologize for not responding before!