Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to load a webp in QImage?
QtWS25 Last Chance

How to load a webp in QImage?

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 718 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jeff1209
    wrote on last edited by
    #1

    I have a simple project that displays an image picked by the user. In the process, I run:

    QImage image;
    image.load(imagePath);
    

    But QImage remains with an "invalid" image. It does work for other image formats, like png and jpg.

    As I understand it, webp is supported by something called "Qt Image Formats", that's external to QtGui, but looking at the plugins/imageformats folder, there is no webp dll, only a qwebp.pdb file.

    How can I acquire this dll? Or am I missing the mark somewhere?

    Christian EhrlicherC 1 Reply Last reply
    0
    • J jeff1209

      I have a simple project that displays an image picked by the user. In the process, I run:

      QImage image;
      image.load(imagePath);
      

      But QImage remains with an "invalid" image. It does work for other image formats, like png and jpg.

      As I understand it, webp is supported by something called "Qt Image Formats", that's external to QtGui, but looking at the plugins/imageformats folder, there is no webp dll, only a qwebp.pdb file.

      How can I acquire this dll? Or am I missing the mark somewhere?

      Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @jeff1209 said in How to load a webp in QImage?:

      Or am I missing the mark somewhere?

      Yes, in the Qt online installer you forgot to install the Qt image formats for your Qt version.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      J 1 Reply Last reply
      2
      • Christian EhrlicherC Christian Ehrlicher

        @jeff1209 said in How to load a webp in QImage?:

        Or am I missing the mark somewhere?

        Yes, in the Qt online installer you forgot to install the Qt image formats for your Qt version.

        J Offline
        J Offline
        jeff1209
        wrote on last edited by
        #3

        @Christian-Ehrlicher That was it, thanks!

        1 Reply Last reply
        1
        • J jeff1209 has marked this topic as solved on

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved