Skip to content

Instantly share code, notes, and snippets.

@nberardi
Last active December 20, 2015 07:19
Show Gist options
  • Save nberardi/6092187 to your computer and use it in GitHub Desktop.
Save nberardi/6092187 to your computer and use it in GitHub Desktop.
#r "System.Drawing.dll"
using System.IO;
using System.Drawing;
using System.Net;
var client = new WebClient();
var bytes = client.DownloadData("http://www.hdwallpapersplus.com/wp-content/uploads/2013/05/Funny-Cat-Pictures-cats-935656_500_375.jpg");
var stream = new MemoryStream(bytes);
var image = Image.FromStream(stream);
Console.WriteLine("size: {0}x{1}", image.Height, image.Width);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment