Open ismail-yilmaz opened 3 years ago
A sort of proof of concept implemention, using the existing jexer protocol:
Works just fine with images.
It uses Upp::RenderSVGImage to render the svg into a raster image that can be displayed as usual. (Currently requires only three more lines of code + 2 lines of code change to the renderer.)
Still, a simple yet fine-grained implementation seems to require at least a few options to the wire protocol (such as default bkg color, custom size, etc.).
@klamonte, would you be okay if I attempt to extend the jexer protocol a little bit to include SVG rendering? (a possible TerminalCtrl-variant?)
@ismail-yilmaz I have no objection. Do you think SVG would make the most sense to be like PNG/JPG, where dimensions are picked up from the image data, or more like RGB where height/width are specified exactly?
Given the increasing popularity of inline images support in virtual terminal emulators, and the usage of SVG in general, the SVG rendering support can be added to TerminalCtrl as a compile-time option, since U++ already provides the necessary and easy-to-use SVG rendering functions.
As for the required changes in the wire protocols: This option doesn't necessarily require any modification of supported/existing wire protocols (DECSIXEL/jexer/iterm2), since TerminalCtrl already uses a generic infrastructure to identify and decode images.