add code of checking sixel buffer size