текущая стратегия, как я вижу, для получения доступа к кадрским буферу Chromium и выводу, как Sixel, и понимает, как работает. Концепция работает здесь достаточно, так как вы должны иметь возможность запустить это напрямую в оболочке Linux: < /p>
Код: Выделить всё
#include
#include
#include
#include
void outputPixmapAsSixel(const QPixmap &pixmap)
{
/* AI generated slop */
QImage img = pixmap.toImage().convertToFormat(QImage::Format_RGB888);
int width = img.width();
int height = img.height();
const uchar *bits = img.constBits();
int stride = img.bytesPerLine(); // Correct stride, accounting for row padding
// Start sixel
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79603669/how-to-use-qwebengine-chromium-to-render-webpages-to-the-terminal-in-a-headl[/url]