title: Swift: UIImage has twice the size
body: <p>When I draw a border around a UIImage with </p>
  
  <pre><code>    let opaque = false
      let scale: CGFloat = 0
      UIGraphicsBeginImageContextWithOptions(CGSize.init(width: ((self.imageView?.image?.size.width)!+512), height: (self.imageView?.image?.size.height)!+512), opaque, scale)
      let context = UIGraphicsGetCurrentContext()
  
      context?.setFillColor(UIColor.yellow.cgColor)
      context?.fill(CGRect.init(x: 0, y: 0, width: (context?.width)!, height: (context?.width)!))
  
      self.imageView?.image?.draw(at: CGPoint.init(x: 256, y: 256))
  
      let image = UIGraphicsGetImageFromCurrentImageContext()
      UIGraphicsEndImageContext()
  </code></pre>
  
  <p>and print out its size, it is totally correct, as I set it: width and height each + 256.</p>
  
  <p>However, when I save the image to library, it has twice its width and twice its height. I have no idea why. Also (and this is the part that annoys me the most), when I want to draw something on the image, also it seem to have twice the sizes...</p>