Class ImageToAsciiService
public class ImageToAsciiService
- Inheritance
-
ImageToAsciiService
- Inherited Members
Constructors
ImageToAsciiService()
public ImageToAsciiService()
Methods
ConvertToAscii(Stream, int, int)
Converts an image to ASCII art using half-block characters (▀▄█) with printable color tags for 2x vertical resolution. Each character cell represents two vertical pixels. Format: {F:RRGGBB} foreground, {B:RRGGBB} background, {X} reset. Uses only printable ASCII — no terminal escape bytes.
public string ConvertToAscii(Stream imageStream, int width = 80, int height = 80)
Parameters
Returns
GetDimensions(string?)
Returns (width, height) dimensions for the given size code. s = small (40x40), m = medium/default (80x80), l = large (120x120).
public static (int Width, int Height) GetDimensions(string? size)
Parameters
sizestring