class Opal::Image::Encoder

Defined in:

opal/image/protocols.cr

Class Method Summary

Class Method Detail

def self.encode_half_block(colors : Array(Array(Color)), width : Int32, height : Int32) : String #

Encodes a 2D RGB grid into universal Unicode TrueColor half-block characters (▀)


[View source]
def self.encode_iterm2(data : Bytes, filename : String = "image.png", width : Int32 | Nil = nil, height : Int32 | Nil = nil) : String #

Encodes raw file or image bytes into iTerm2 inline image escape sequence


[View source]
def self.encode_kitty(rgb_bytes : Bytes, width : Int32, height : Int32) : String #

Encodes raw RGB bytes (width * height * 3) into Kitty graphics protocol escape chunks


[View source]