pull/2/head
sidekek 5 years ago
parent d11a43cfa9
commit 87f7d91a4f
  1. 35
      Program.cs
  2. 9
      kot.csproj
  3. BIN
      kurisu.jpg

@ -0,0 +1,35 @@
using System;
using System.Drawing;
namespace kot
{
class Program
{
static void Main(string[] args)
{
string final = "";
string[] scale = {".",",",":",";","+","*","?","%","S","#","@"};
//Array.Reverse(scale);
var f = new Bitmap("./kurisu.jpg");
for (int i = 0; i < f.Height; i += 30)
{
for (int z = 0; z < f.Width; z += 30)
{
float bright = f.GetPixel(z, i).GetBrightness();
string temp = "";
for (float x = 1; x > 0; x -= .1f)
{
int shit = (int)(x * 10);
if (bright < x)
{
temp = scale[shit];
}
}
final += temp;
}
final += "\n";
}
Console.Write(final);
}
}
}

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Drawing.Common" Version="4.7.0"/>
</ItemGroup>
</Project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 MiB

Loading…
Cancel
Save