Ejemplo n.º 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();
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 3
0
        static void EyeBlackAndWhite()
        {
            // Source: https://mathematica.stackexchange.com/questions/42638/creating-an-image-from-data-not-in-grayscale
            ReportStart();
            string url = @"http://i.stack.imgur.com/397vv.png";

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

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

                // Color
                asciifier.ColorLow = Gray(130);
                //asciifier.ColorHigh = Gray(220);
                Color background = Color.Gray;
                //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 = AsciifyPalette.BlackOnWhite;

                // Asciify
                asciifier.Initialize(font, charset, palette);
                using (Bitmap prepared = asciifier.PrepareImage(input, 3, background))
                    using (Bitmap output = asciifier.AsciifyImage(prepared))
                        output.OpenInMSPaint();
            }
            ReportEnd();
        }
Ejemplo n.º 4
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();
        }
Ejemplo n.º 5
0
        static void PsychoPassGrayscale()
        {
            // 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, nameof(PsychoPass))) {
                ISectionedAsciifier asciifier = Asciifier.SectionedIntensity;
                //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(10);
                asciifier.ColorHigh = Gray(230);
                Color background = Color.Black;
                //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 = AsciifyPalette.FromGrayscale(0, 255, 16, background: background);

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