mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-13 11:25:02 -05:00
Merge pull request #2289 from laanwj/201301_qimage_bits
Use QImage.bits instead of QImage.constBits to ease backporting
This commit is contained in:
commit
6749082294
1 changed files with 1 additions and 1 deletions
|
@ -113,7 +113,7 @@ FreedesktopImage::FreedesktopImage(const QImage &img):
|
||||||
{
|
{
|
||||||
// Convert 00xAARRGGBB to RGBA bytewise (endian-independent) format
|
// Convert 00xAARRGGBB to RGBA bytewise (endian-independent) format
|
||||||
QImage tmp = img.convertToFormat(QImage::Format_ARGB32);
|
QImage tmp = img.convertToFormat(QImage::Format_ARGB32);
|
||||||
const uint32_t *data = reinterpret_cast<const uint32_t*>(tmp.constBits());
|
const uint32_t *data = reinterpret_cast<const uint32_t*>(tmp.bits());
|
||||||
|
|
||||||
unsigned int num_pixels = width * height;
|
unsigned int num_pixels = width * height;
|
||||||
image.resize(num_pixels * BYTES_PER_PIXEL);
|
image.resize(num_pixels * BYTES_PER_PIXEL);
|
||||||
|
|
Loading…
Add table
Reference in a new issue