using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.IO;
using System.Xml;
using System.Xml.Serialization;
using ImageBlockz.Core;

namespace ImageBlockz.Core
{
    class Program
    {
        static void Main(string[] args)
       {
           /*
          System.Console.WriteLine(Directory.GetCurrentDirectory());

          Bitmap img = new Bitmap(@"Images\testFoto.png");

          History history = new History { };

          history.Add(img);

           

          seq.Add(crop);
          seq.Add(new Crop(new Rectangle(30, 30, 50, 50)));
          seq.Add(new Resize(new Size(500, 500)));
          seq.Add(new Rotate(180));
          seq.Add(new CircularSegmentation());
          seq.Add(new ColorMaping("JET"));
          seq.Add(new TextToImage("Testovaci text v obrazku c.1"));

          */
            /*
            Sequence inSeq = new Sequence();

            inSeq.Add(new Resize(new Size(1000, 1000)));
            inSeq.Add(new Crop(new Rectangle(100, 100, 300, 300)));
            inSeq.Add(new Resize(new Size(500, 500)));
            inSeq.Add(new Rotate(30));

            string filename = @"Xml\test2.xml";

            

            XmlTextWriter writer = new XmlTextWriter(filename, null);
            inSeq.ToXml(new XmlDocument()).WriteTo(writer);
            writer.Formatting = Formatting.Indented;
            writer.Close();
            

            XmlDocument xmlDoc = new XmlDocument();
            xmlDoc.Load(filename);
            Sequence outSeq = new Sequence();
            outSeq.FromXml(xmlDoc.FirstChild);

            img = outSeq.Do(img);

            SaveToJpg.SaveJpg(new Bitmap(img), @"Images\Result6.png", 100L);

            history.Add(img);
                        
            

            

            //Console.WriteLine(seq.Counter());
            Console.WriteLine(history.Counter());




            */
            System.Console.ReadKey();
            
            
        }
    }
}
