Qt World Summit: Submit your Presentation

QT Abstraction to render to a RGBA32 in-memory image

  • I have an embedded device that needs to output some propietary pixel data. My vendor has provided me with methods to convert an RGBA32 image, and and set it to a framebuffer.

    If QT can provide me with a RGBA32 representation (alpha channel important) of a window, I can handle the rest (converting RGBA to vendor format to framebuffer), but can QT do this? Any guidance on this?

  • Hi,
    have a look at QPixmap QScreen::​grabWindow() (http://doc.qt.io/qt-5/qscreen.html#grabWindow).

  • HI and welcome to devnet,

    QImage class handle the format you need with QImage::Format_ARGB32; so you can load any images and convert in your format using QImage::convertToFormat()

    Here you can find more information

    Adding something to what @Wieland said I suggest to use QWidget::grab() to get the QPixmap and convert to a QImage

  • @Wieland @mcosta Thanks for the guidance. This lead me to the the linuxfb platform integration. It sounds like what I want to do is develop a custom platform for my vendor's hardware. This platform will display one screen, and I will properly flush the frames to the framebuffer in the vendor-specific format.

Log in to reply