using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using skyscraper5.Skyscraper.IO;

namespace skyscraper8.AnagramViewer.Handlers
{
	internal class PngHandler : IFileTypeHandler
	{
		public DataType CheckDataType(Stream input)
		{
			if (input.ReadUInt32LE() == 1196314761)
				return DataType.Image;
			return DataType.Unknown;
		}

		public Image AsImage(Stream input)
		{
			return Image.FromStream(input);
		}

		public string AsText(Stream input)
		{
			throw new NotImplementedException();
		}
	}
}
