Skip to content

Commit

Permalink
Update XkcdService.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
BitPatty authored May 26, 2020
1 parent f26f783 commit 40d9514
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Bonobo/XkcdService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ public static void PrintImageAsAscii(Bitmap image)
{
Color oc = image.GetPixel(j, i);
int grayScale = (int)((oc.R * 0.3) + (oc.G * 0.59) + (oc.B * 0.11));
Color nc = Color.FromArgb(oc.A, grayScale, grayScale, grayScale);
Console.Write(GetShade(nc.R));
Console.Write(grayScale);
}

Console.WriteLine("");
Expand Down Expand Up @@ -137,4 +136,4 @@ public sealed class XkcdPostDetail
public string ImageUrl { get; set; }
}
}
}
}

0 comments on commit 40d9514

Please sign in to comment.