title: reading value in CFDictionary with swift
body: <p>I'm just starting with swift and cocoa. I'm trying to create a basic app that does image manipulation.</p>
  
  <p>I've allready got all information of the image with this:</p>
  
  <pre><code>let imageRef:CGImageSourceRef = CGImageSourceCreateWithURL(url, nil).takeUnretainedValue()
  let imageDict:CFDictionaryRef = CGImageSourceCopyPropertiesAtIndex(imageRef, 0, nil).takeUnretainedValue()
  </code></pre>
  
  <p>the dictionary contains following information:</p>
  
  <pre><code>{
      ColorModel = Gray;
      DPIHeight = 300;
      DPIWidth = 300;
      Depth = 1;
      Orientation = 1;
      PixelHeight = 4167;
      PixelWidth = 4167;
      "{Exif}" =     {
          ColorSpace = 65535;
          DateTimeDigitized = "2014:07:09 20:25:49";
          PixelXDimension = 4167;
          PixelYDimension = 4167;
      };
      "{TIFF}" =     {
          Compression = 1;
          DateTime = "2014:07:09 20:25:49";
          Orientation = 1;
          PhotometricInterpretation = 0;
          ResolutionUnit = 2;
          Software = "Adobe Photoshop CS6 (Macintosh)";
          XResolution = 300;
          YResolution = 300;
      };
  }
  </code></pre>
  
  <p>now I'd like to read the value for the DPI with following code and there is some problem with "__conversion" I don't understand. </p>
  
  <pre><code>let dpiH:NSNumber = CFDictionaryGetValue(imageDict, kCGImagePropertyDPIWidth)
  </code></pre>
  
  <p>what am I doing wrong and how can I get to the desired values of the dictionary?</p>