mdp / qrterminal

QR Codes in your terminal
MIT License
442 stars 53 forks source link

Add sixel support #9

Closed tssva closed 8 months ago

tssva commented 6 years ago

Are you open to adding support for output in sixel format? Sixel is a format developed by DEC for printing graphics to a terminal attached printer. It was later used to display graphics on the terminals themselves. Several terminals including mlterm and xterm can support sixel graphics.

Although it is used to display graphics the format itself is text based and can be easily created using the same basic routines used by qrterminal to generate the text formats. I have a fork of qrterminal with sixel support and if you are interested in adding support will submit a PR.

My fork does make a significant change to qrterminal. Instead of adding another flag similar to the HalfBlocks to the Config struct I added a new Format entry. Format can currently be 1 of 3 defined constants, FullBlocks, HalfBlocks or Sixel. I implemented the change in a manner that will not break existing code. If Format is not set and Halfblocks is not true than a FullBlocks version will be generated. If HalfBlocks is true than a HalfBlocks version will be generated no matter the Format setting. If HalfBlocks is false and Format is set than the version specified by Format will be generated.

juls commented 5 years ago

Hi @tssva , I'd really like to give your fork a try. Is it public somewhere? Or could you even open a PR for it? Many thanks!

mdp commented 8 months ago

Closing as this is merged in and support has grown for sixel support