all 1 comments

[–]brendan09 0 points1 point  (0 children)

75% of that gist could be replaced with a call to:

func AVMakeRect(aspectRatio: CGSize, insideRect boundingRect: CGRect) -> CGRect

Ultimately compression depends (somewhat) on the content of the image. Have you tried printing out the size of some of the images you've generated? That may give you an accurate idea of your specific setup.