using System;
using System.Drawing;
public class Image() {
private int height;
private int width;
public Image(string ImageFilePath)
{
try
{
System.Drawing.Image img = System.Drawing.Image.FromFile(ImageFilePath);
this.height = img.Height; this.width = img.Width;
}
catch
{
this.height = -1; this.width = -1;
}
}
public int Height
{
get
{
return this.height;
}
}
public int Width
{
get
{
return this.width;
}
}
}