title: CGAffineTransform matrix in user readable format
body: <p>How should I interpret CoreGraphics CGAffineTransform into human readable, meaningful format?</p>
  
  <p>I’m looking to take something like:</p>
  
  <p></p>
  
  <pre><code>NSLog(@"naturalSize %@, appliedSize %@, transformationMatrix %@",
        NSStringFromCGSize(clipVideoTrack.naturalSize),
        NSStringFromCGSize(CGSizeApplyAffineTransform(clipVideoTrack.naturalSize, clipVideoTrack.preferredTransform)),
        NSStringFromCGAffineTransform(clipVideoTrack.preferredTransform));
  </code></pre>
  
  <blockquote>
    <p>naturalSize {1920, 1080}, appliedSize {-1080, 1920},
    transformationMatrix [0, 1, -1, 0, 1080, 0]</p>
  </blockquote>
  
  <p>The end result of the above matrix transformation is taking this <a href="https://github.com/maximveksler/AVFoundationCropVideo/blob/master/Crop%20Video%20Square/LandscapeRight_16-9.mp4" rel="noreferrer">Landscape Right Video</a> and transforming into this <a href="https://github.com/maximveksler/AVFoundationCropVideo/blob/master/Crop%20Video%20Square/PortraintUp_9-16.mp4" rel="noreferrer">Portrait Up Video</a></p>
  
  <p>I would be glad to be able to break it down into steps, human readable form so that one can look and understand what the transformation is actually doing. </p>
  
  <p>Something like (not sure I’m getting the steps right):</p>
  
  <pre><code> 0. Will use upper left corner for video export of width 1080, height 1920.
   1. Will move the video -1080(left) on the x axis 
   2. Will move the video 1920(down) on the y axis
   3. Will rotate 90deg clockwise from bottom right corner 
  </code></pre>
  
  <p>I would appreciate for points to a code that does this, or an implementation or an explanation. I attempting to learn and understand how exactly is the transformation matrix in the context of AVFoundation is functioning.</p>