fixed scaling on retina display and some deprecated warnings

Hello,

I noticed that UIImage size is in points while CGImage is in pixels which made the partial image have the right size but the content was scaled up version of a quarter of the original picture on a retina display so I updated the partialImage function to support this. I also updated some deprecated functions.

Kenneth