Skip to content

Commit

Permalink
Generate gradients in QImage::Format_RGB32.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Aug 17, 2021
1 parent 38d65bf commit 6b320a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/image/image_prepare.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ template <int kBits> // 4 means 16x16, 3 means 8x8
auto result = QImage(
kWidth,
kHeight,
QImage::Format_ARGB32_Premultiplied);
QImage::Format_RGB32);
Assert(result.bytesPerLine() == kWidth * 4);

auto cache = pixelCache.get();
Expand Down Expand Up @@ -819,7 +819,7 @@ QImage BlurLargeImage(QImage image, int radius) {
} else if (colors.size() > 2) {
return GenerateComplexGradient(size, colors, rotation, progress);
}
auto result = QImage(size, QImage::Format_ARGB32_Premultiplied);
auto result = QImage(size, QImage::Format_RGB32);
if (colors.size() == 1) {
result.fill(colors.front());
return result;
Expand Down

0 comments on commit 6b320a9

Please sign in to comment.