I've created a project, added a reference to System.Drawing, and added a bmp file "screenshot003.bmp". I've r-clicked the bmp-file and brought up it's properties. I marked it as "Content". When I run the app, it crashed - probably b/c it couldn't open the bitmap. How do I fix it?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Drawing.Imaging;
namespace Converter
{
class Program
{
static void Main(string[] args)
{
const string imgFileName = "screenShot003.bmp";
try
{
Bitmap image = new Bitmap(imgFileName);
Console.WriteLine("{0} : {1} x {2}", imgFileName, image.Width, image.Height);
}
catch (Exception e)
{
Console.WriteLine("{0}", e.Message);
}
}
}
}