Given a UIImage of any dimension, I wish to generate a square \"icon\" sized version, px pixels to a side, without any distortion (stretching). How
px
wheeliebin answers is correct but he forgot a minus sign in front of destY
destRect = CGRectMake(0, -destY, destSize, destHeight);