Patched FFmpeg in above demo runs the following procedure.
emits a CUP sequence(move cursor to [1, 1]).
emits DECSIXEL sequence (only 16 color register were used. it's considered VT340 compatible).
return to 1.
In view of image processing, we have done many trials and errors(scene change detection, color quantization, high quality dithering, high compression achievement, ...etc). But they are not terminal issue.
Comment 3 by u...@zuse.jp on October 16, 2014 13:32
Example3: https://www.youtube.com/watch?v=QQAqe32VkFg
In this demo, we also used "Left-Right margin mode"(DECLRMM) to scroll vertical-splitted region with SIXEL images. It is already supported by iTerm2.
DEC Locator mode
It is an option, but this would be required by some GUI-flavored terminals applications(such as Example2).
This feature requires the following set of control codes.
DECELR
DECSLE
DECRQLP
DECEFR
Set pixel size with TIOCSWINSZ
Now iTerm2 doesn't set its own pixel dimentions of client area to (winsize.ws_xpixel, winsize.ws_xpixel) with TIOCSWINSZ ioctl.
Some terminals such as Terminal.app or Xterm does that.
If iTerm2 do it, terminal applications can get terminal pixel size over TIOCGWINSZ ioctl.
This technique is already used by ranger(https://github.com/hut/ranger/blob/master/ranger/ext/img_display.py#L117).
Although applications can be use CSI 14 t/CSI 18 t instead of it, I think that's not a proper way.
Changing Primary DA report
If we implement SIXEL or DEC Locator, we should change the report for device attributes request (ESC [ c).