module

Ansi::Sixel

Constants

BEL = 7_u8
CarriageReturn = '$'.ord.to_u8
ColorIntroducer = '#'.ord.to_u8
ESC = 27_u8
LineBreak = '-'.ord.to_u8
MaxColors = 256
RasterAttribute = '"'.ord.to_u8
RepeatIntroducer = '!'.ord.to_u8
ST = 156_u8

Class methods

color_to_ansi(color : Color) : Ansi::Color
Source
convert_channel(c16 : UInt32) : UInt32
Source
decode_color(data : Bytes) : Tuple(Color, Int32)

ameba:disable Metrics/CyclomaticComplexity

Source
decode_raster(data : Bytes) : Tuple(Raster, Int32)
Source
decode_repeat(data : Bytes) : Tuple(Repeat, Int32)
Source
default_palette

DefaultPalette returns the default palette used when decoding a Sixel image. It contains the 256 colors defined by the xterm 256-color palette.

Source
from_color(color : Ansi::Color) : Color

FromColor returns a Sixel color from a color. It converts the color channels to the 0-100 range.

Source
new_palette(image : Ansi::Image, max_colors : Int32) : Palette
Source
sixel_convert_color(color : Ansi::Color) : SixelColor
Source
sixel_hls(h : Int32, l : Int32, s : Int32) : Ansi::Color
Source
sixel_rgb(r : Int32, g : Int32, b : Int32) : Ansi::Color
Source
to_16bit(channel : UInt8) : UInt32
Source
write_color(io : IO, pc : Int32, pu : Int32, px : Int32, py : Int32, pz : Int32) : Int32
Source
write_raster(io : IO, pan : Int32, pad : Int32, ph : Int32, pv : Int32) : Int32
Source
write_repeat(io : IO, count : Int32, char : Char) : Int32
Source

Nested types