Fortran bindings for the Sixel library
- CMake
- a Fortran and a associated C compiler : Gfortran/Gcc, ifx/icc, nvfortran/nvc
- a compiled version of the Sixel library [https://github.com/saitoha/libsixel]
- a terminal supporting Sixel standard : Wezterm or
xtermwith the good option
cmake -B build && make -C buildYou could easily render a RGB encoded image with 256 colors in your terminal such as in
use m_rgb_image
!(...)
integer :: m, n, i, j
type(rgb_img) :: img
m = 254
n = 254
call img%init(m,n)
do j=1, n
do i=1, m
img%buff(i, j)%v = achar(int(255*[i*1./m, j*1./n, 0.2]))
end do
end do
call img%render()