Facebook.Schema.user.picture_square broken?

Dec 16, 2009 at 1:37 PM
Hi guys,

I'm getting a GDI exception when i try this:

 // get friend data
Facebook.Schema.user u = Api.Users.GetInfo(friendId);

// save image
System.IO.MemoryStream memoryStream = new System.IO.MemoryStream();
u.picture_square.Save(memoryStream, u.picture_square.RawFormat);

But when i manually download the image via a URL and save that to the stream its fine, i.e.

HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(u.pic_square);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
System.Drawing.Image img = System.Drawing.Image.FromStream(response.GetResponseStream());
response.Close();
img.Save(memoryStream, img.RawFormat);

 Is it possible that user.picture_square doesn't actually work?

Ta, Paul.