title: Cropping CIImage
body: <p>I have a class that takes an <code>UIImage</code>, initializes a <code>CIImage</code> with it like so:</p>
  
  <pre><code>workingImage = CIImage.init(image: baseImage!)
  </code></pre>
  
  <p>Then the image is used to cut out 9 neighbouring squares in a 3x3 pattern out of it - in a loop:</p>
  
  <pre><code>for x in 0..&lt;3
      {
          for y in 0..&lt;3
          {
  
              croppingRect = CGRect(x: CGFloat(Double(x) * sideLength + startPointX),
                                    y: CGFloat(Double(y) * sideLength + startPointY),
                                    width: CGFloat(sideLength),
                                    height: CGFloat(sideLength))
              let tmpImg = (workingImage?.cropping(to: croppingRect))!
          }
      }
  </code></pre>
  
  <p>Those tmpImgs are inserted into a table and later used, but thats besides the point. </p>
  
  <p>This code works on <code>IOS 9</code>, and on <code>IOS 10</code> simulators, but <strong>not</strong> on an actual <strong>IOS 10 device</strong>. The images produced are either all empty, or one of them is like a half of what its supposed to be, with the rest being, again, empty.</p>
  
  <p>Is this not how its supposed to be done in <code>IOS 10</code>?</p>