func
压缩
(
原图
:
UIImage
) ->
NSData
{
//prepare constants
let width = 原图.size.width
let height = 原图.size.height
let scale = width/height
var sizeChange = CGSize()
if width <= 400
//prepare constants
let width = 原图.size.width
let height = 原图.size.height
let scale = width/height
var sizeChange = CGSize()
if width <= 400