title: How to convert pixel dimension to CG Size in Swift?
body: <p>I have large images uploaded by users in Swift and I need to resize them all to 100x100px to create thumbnails to store in my server. So far I have found that this resizes an image given a CGSize:</p>
  <pre><code>func resizedImage(image: UIImage, size: CGSize) -&gt; UIImage? {
      let renderer = UIGraphicsImageRenderer(size: size)
      return renderer.image { (context) in
          image.draw(in: CGRect(origin: .zero, size: size))
      }
  }
  </code></pre>
  <p><strong>Is there any way to create a CGSize knowing that my target size is strictly 100x100px?</strong></p>