Opal::UI::AsciiImage
Inherits Opal::UI::Element < Opal::UI::Themable < Reference < Object
UI Element that renders TrueColor pixel buffers as terminal ASCII art. Supports high-resolution half-block rendering, optical luminance nearest-char rendering, nearest-neighbor & bilinear interpolation, and aspect ratio compensation.
Constants
RAMP_BLOCKS = " ░▒▓█"
High-contrast glyph ramp
RAMP_DETAILED = " .'`^\",:;Il!i><~+_-?][}{1)(|\\/tfjrxnuvczXYUJCLQ0OZmwqpdbkhao*#MW&8%B@$"
Detailed 70-level ASCII optical density ramp
RAMP_STANDARD = " .:-=+*#%@"
Standard 10-level ASCII optical density ramp (light to dark)
Constructors
new(image : Opal::Image::PixelBuffer, mode : Symbol | AsciiRenderMode = :half_block, interpolation : Symbol | Opal::Image::Interpolation = :bilinear, ramp : String = RAMP_STANDARD, colorize : Bool = true, bold : Bool = false, bg : Color | Symbol | String = Color.none)
SourceInstance methods
bg
Sourcebg=(bg : Color)
Sourcebold?
Sourcecolorize?
Sourceimage
Sourceimage=(image : Opal::Image::PixelBuffer)
Sourceinterpolation
Sourceinterpolation=(interpolation : Opal::Image::Interpolation)
Sourcemode
Sourcemode=(mode : AsciiRenderMode)
Sourceramp
Source