示例#1
0
        static void StandardLink()
        {
            // Source: https://hyruleanassassin.deviantart.com/art/Link-Minimalist-Wallpaper-647717661
            ReportStart();
            string url = @"https://pre00.deviantart.net/254c/th/pre/i/2017/172/5/8/link_minimalist_wallpaper_by_hyruleanassassin-dapmu59.jpg";

            using (Bitmap input = DownloadImage(url)) {
                IAsciifier asciifier = Asciifier.SectionedColor;
                asciifier.MaxDegreeOfParallelism = MaxCores;

                // Text
                ICharacterSet charset = new OrderedCharacterSet("COURAGE", new OrderedRules());
                IAsciifyFont  font    = new TrueTypeAsciifyFont("Lucida Console", 10, FontStyle.Bold, charset, true);

                // Color
                asciifier.ForegroundOnly = true;
                Color          background = Color.FromArgb(2, 38, 2);
                List <Color>   colors     = PaletteChooser.FindMainColorsByLab(input, 256, 8);
                AsciifyPalette palette    = new AsciifyPalette(colors, background: background);

                // Asciify
                asciifier.Initialize(font, charset, palette);
                using (Bitmap prepared = asciifier.PrepareImage(input, 1, background))
                    using (Bitmap output = asciifier.AsciifyImage(prepared))
                        output.OpenInMSPaint();
            }
            ReportEnd();
        }
示例#2
0
        static void SmugAnimeFace()
        {
            // Source: https://www.reddit.com/r/Nisekoi/comments/49qsnx/made_a_minimalist_wallpaper_for_smug_marika/
            ReportStart();
            string url = @"https://i.imgur.com/Ne42TUC.png";

            using (Bitmap input = DownloadImage(url)) {
                IAsciifier asciifier = Asciifier.SectionedColor;
                asciifier.MaxDegreeOfParallelism = MaxCores;

                // Text
                ICharacterSet charset = new OrderedCharacterSet("SMUGANIMEFACE", new OrderedRules());
                IAsciifyFont  font    = new TrueTypeAsciifyFont("Lucida Console", 10, FontStyle.Bold, charset, true);

                // Color
                asciifier.ForegroundOnly = true;
                Color          background = Color.FromArgb(113, 113, 113);
                List <Color>   colors     = PaletteChooser.FindMainColorsByLab(input, 256, 5);
                AsciifyPalette palette    = new AsciifyPalette(colors, background: background);

                // Asciify
                asciifier.Initialize(font, charset, palette);
                using (Bitmap prepared = asciifier.PrepareImage(input, 1, background))
                    using (Bitmap output = asciifier.AsciifyImage(prepared))
                        output.OpenInMSPaint();
            }
            ReportEnd();
        }
示例#3
0
        static void MakinaRoger()
        {
            // Source: Grisaia no Kajitsu
            ReportStart();
            string url = @"https://i.imgur.com/KDxsmOd.png";

            using (Bitmap input = DownloadImage(url)) {
                IAsciifier asciifier = Asciifier.SectionedColor;
                asciifier.MaxDegreeOfParallelism = MaxCores;

                // Text
                ICharacterSet charset = CharacterSets.Default;
                IAsciifyFont  font    = new TrueTypeAsciifyFont("Lucida Console", 10, FontStyle.Bold, charset, true);

                // Color
                Color          background = DiscordDark;
                List <Color>   colors     = PaletteChooser.FindMainColorsByLab(input, 256, 7);
                AsciifyPalette palette    = new AsciifyPalette(colors, background: background);

                // Asciify
                asciifier.Initialize(font, charset, palette);
                using (Bitmap prepared = asciifier.PrepareImage(input, 1, background))
                    using (Bitmap output = asciifier.AsciifyImage(prepared))
                        output.OpenInMSPaint();
            }
            ReportEnd();
        }
示例#4
0
        static void PsychoPass()
        {
            // Source: http://www.nerdgasmneeds.com/2016/02/new-psycho-pass-dominator-replica-video.html
            ReportStart();
            string url = @"http://www.nerdgasmneeds.com/wp/wp-content/uploads/2016/02/psycho-pass-dominator-art-03.png";

            using (Bitmap input = DownloadImage(url)) {
                ISectionedAsciifier asciifier = Asciifier.SectionedColor;
                //asciifier.AllFactor
                asciifier.MaxDegreeOfParallelism = MaxCores;

                // Text
                //ICharacterSet charset = CharacterSets.Default;
                //IAsciifyFont font = new TrueTypeAsciifyFont("Lucida Console", 10, FontStyle.Bold, charset, true);
                ICharacterSet charset = CharacterSets.Bitmap;
                IAsciifyFont  font    = new BitmapAsciifyFont("Terminal", new Size(8, 12), charset);

                // Color
                //asciifier.ColorLow = Gray(50);
                //asciifier.ColorHigh = Gray(220);
                Color background = DiscordDark;
                //List<Color> colors = PaletteChooser.FindMainColorsByLab(input, 256, 1.5);
                //colors = PaletteChooser.FindMainColorsByHsb(input, 256, 0.1f, 0.001f, 0.001f);
                //AsciifyPalette palette = new AsciifyPalette(colors, background: background);
                List <Color> colors = PaletteChooser.FindMainColorsByLab(input, 16, 14);
                //colors = PaletteChooser.FindMainColorsByHsb(input, 256, 0.1f, 0.001f, 0.001f);
                AsciifyPalette palette = new AsciifyPalette(colors);

                // Asciify
                asciifier.Initialize(font, charset, palette);
                using (Bitmap prepared = asciifier.PrepareImage(input, 1.5, background))
                    using (Bitmap output = asciifier.AsciifyImage(prepared))
                        output.OpenInMSPaint();
            }
            ReportEnd();
        }