gavinbunney / Toucan

Fabulous Image Processing in Swift
MIT License
2.44k stars 224 forks source link

How can i achieve UIViewContentMode.ScaleAspectFit #23

Closed nishantdongare closed 9 years ago

nishantdongare commented 9 years ago

I want to achieve ScaleAspectFit in toucan. Is it possible.

gavinbunney commented 9 years ago

Sure is - You need to set the fit mode to Clip:

e.g. Toucan(image: portraitImage).resize(CGSize(width: 500, height: 500), fitMode: Toucan.Resize.FitMode.Clip).image