using System;
using System.Drawing;
using System.IO;

namespace Imaging.DDSReader
{
	public static class DDS
	{
		public static Bitmap LoadImage(byte[] data, bool alpha = true)
		{
			DDSImage im = new DDSImage(data, alpha);
			return im.BitmapImage;
		}

		public static Bitmap LoadImage(string file, bool alpha = true)
		{
			byte[] data = File.ReadAllBytes(file);
			DDSImage im = new DDSImage(data, alpha);
			return im.BitmapImage;
		}

		public static Bitmap LoadImage(Stream stream, bool alpha = true)
		{
			DDSImage im = new DDSImage(stream, alpha);
			return im.BitmapImage;
		}
	}

	public class UnknownFileFormatException : Exception
	{
	}

	public class InvalidFileHeaderException : Exception
	{
	}

	public class NotADDSImageException : Exception
	{
	}
}