Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
5.5.1
-
Windows 7
-
2268b6bcdd1b4ddcd78753b81c477f0aa2855261 (qtbase/dev, 10.4.2018, 5.12),acb67561a3753306a2262f7221baca2d727fd4cb (qtwinextras/dev, 18.4.2018, 5.12)
Description
Add support for other image depths in toWinHBITMAP(), currently only 1 and 32bit depths are supported so other formats are converted up to 32bit which means the images end up being bigger than necessary. Adding support for 8, 16 and 24 bits would make it more efficient.
As of 5.6
HBITMAP toHBITMAP(const QPixmap &p, HBitmapFormat format = HBitmapNoAlpha); QPixmap fromHBITMAP(HBITMAP bitmap, HBitmapFormat format = HBitmapNoAlpha); HICON toHICON(const QPixmap &p); QImage imageFromHBITMAP(HDC hdc, HBITMAP bitmap, int width, int height); QPixmap fromHICON(HICON icon);
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-51124 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
149689,23 | QtGui: Add qt_imageToWinHBITMAP(), qt_imageFromWinHBITMAP() | dev | qt/qtbase | Status: MERGED | -2 | 0 |
150540,3 | tst_qpixmap: Fix warnings as shown by Qt Creator's Clang based code model. | 5.6 | qt/qtwinextras | Status: MERGED | +2 | 0 |
153169,3 | QtTest: Add formatting for QColor. | 5.7 | qt/qtbase | Status: MERGED | +2 | 0 |
153243,5 | Add imageToHBITMAP(), imageFromHBITMAP() | dev | qt/qtwinextras | Status: MERGED | +2 | 0 |
153244,4 | Add a manual test for the image conversion functions. | dev | qt/qtwinextras | Status: MERGED | +2 | 0 |
225994,4 | qpixmap_win.cpp: Silence clang-cl warnings | dev | qt/qtbase | Status: MERGED | +2 | 0 |