Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-60566

image returned from QtWin::fromHBITMAP display weird

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 5.8.0
    • Extras: Win
    • None
    • win10 pro x64 build 14393

    Description

      Sample1:
      1: use IShellItemImageFactory::GetImage on a spcified file or folder, got a HBITMAP object
      2: pass this HBITMAP object into QtWin::fromHBITMAP, got a QPixmap object
      3: show this QPixmap in qml over QQuickImageProvider
      4: I found some weird white area in image

      Sample2:
      1: still, use IShellItemImageFactory::GetImage got corresponding HBITMAP object
      2: then just open a dialog which hash a STATIC control, show HBITMAP on that control
      3: image is clear

      Result:
      the attachment is a comparison image .
      left side is the result of Sample1.
      right side is the result of Sample2.

      Is that a BUG? thanks for your time

      --------------------------- More Information -------------------------------
      1: you can build sample1 & sample, they are complete
      2: run them with command line , usage: xxx.exe [ small | medium | large | extralarge ] [ file | folder]
      3: I know why there existed weird white area in image:
      A: after using QtWin::fromHBITMAP, the the image's background is white , not transparent
      B: draw HBITMAP on a static control with win32 api, it's background is transparent

      Attachments

        1. 20170504145313.png
          8 kB
          amy haber
        2. HBITMAPTest (Sample1).zip
          9 kB
          amy haber
        3. qtbug60566.zip
          8 kB
          Friedemann Kleint
        4. UsingImageFactory (Sample2).zip
          5 kB
          amy haber
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kleint Friedemann Kleint
            shad0w amy haber
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes