示例#1
0
        private static void SaveHTMLToFile()
        {
            List <string> html = new List <string>();

            html.Add("<pre>");
            foreach (string line in _Content)
            {
                html.Add(line.Replace(" ", "&nbsp;") + "<BR>");
            }
            html.Add("</pre>");
            ASCIIConverter.WriteContentToFile(html);
        }
示例#2
0
        public static void Convert()
        {
            //Load the Image from the specified path
            Console.WriteLine(txtPath);
            Bitmap image = new Bitmap(txtPath, true);

            //
            //Resize the image...
            //I've used a trackBar to emulate Zoom In / Zoom Out feature
            //This value sets the WIDTH, number of characters, of the text image
            image = GetReSizedImage(image, 150);
            //
            //Convert the resized image into ASCII
            _Content = ConvertToAscii(image);
            //
            ASCIIConverter.WriteContentToFile();
        }