mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-24 02:42:50 +00:00
knotify: ImageConverter::variantForImage() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
f430a47304
commit
2753ae991a
1 changed files with 1 additions and 2 deletions
|
@ -74,8 +74,7 @@ QVariant variantForImage(const QImage &_image)
|
||||||
// endianess:
|
// endianess:
|
||||||
// - In big endian the order is A,R,G,B
|
// - In big endian the order is A,R,G,B
|
||||||
// - In little endian the order is B,G,R,A
|
// - In little endian the order is B,G,R,A
|
||||||
QByteArray data;
|
QByteArray data(rowStride * image.height(), 0);
|
||||||
data.resize(rowStride * image.height());
|
|
||||||
char* dst = data.data();
|
char* dst = data.data();
|
||||||
for (int y=0; y<image.height(); ++y) {
|
for (int y=0; y<image.height(); ++y) {
|
||||||
const QRgb* src = (const QRgb*)image.constScanLine(y);
|
const QRgb* src = (const QRgb*)image.constScanLine(y);
|
||||||
|
|
Loading…
Add table
Reference in a new issue