Skip to content

aitzkora/fsixel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fsixel

Fortran bindings for the Sixel library

requirements

  • 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 xterm with the good option

configure, compile and test

cmake -B build && make -C build

test

You 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()

which gives the following result View in Wezterm

About

fortran bindings for the sixel library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors