title: NSData gives NULL
body: <p>I converted an <code>UIImage</code> into <code>NSString</code> with <code>base64</code> encoding, but the data results empty. Here is my code:</p>
  
  <pre><code>[Base64 initialize];
      NSString *imageString = [NSString stringWithFormat:@"img:%@", [Base64 encode:UIImagePNGRepresentation(shared.image)]];
      NSData *imageData = [NSData dataWithBase64EncodedString:imageString];
      [shared.outputStream write:[imageData bytes] maxLength:[imageData length]];
  </code></pre>
  
  <p>I have no idea on what's going on !! If I use UTF-8 Encoding, it works just fine, but the <code>UIImage</code> <code>imageWithData</code> results null (that is not the part of the question).
  What am I doing wrong?</p>
  
  <hr>
  
  <p>By way of background, the intent here is to modify this <a href="http://www.raywenderlich.com/3932/how-to-create-a-socket-based-iphone-app-and-server" rel="nofollow">Ray Wenderlich demo</a> so it can send images, too.</p>