Generate gradients in QImage::Format_RGB32.
This commit is contained in:
parent
38d65bf16e
commit
6b320a99da
1 changed files with 2 additions and 2 deletions
|
|
@ -229,7 +229,7 @@ template <int kBits> // 4 means 16x16, 3 means 8x8
|
||||||
auto result = QImage(
|
auto result = QImage(
|
||||||
kWidth,
|
kWidth,
|
||||||
kHeight,
|
kHeight,
|
||||||
QImage::Format_ARGB32_Premultiplied);
|
QImage::Format_RGB32);
|
||||||
Assert(result.bytesPerLine() == kWidth * 4);
|
Assert(result.bytesPerLine() == kWidth * 4);
|
||||||
|
|
||||||
auto cache = pixelCache.get();
|
auto cache = pixelCache.get();
|
||||||
|
|
@ -819,7 +819,7 @@ QImage BlurLargeImage(QImage image, int radius) {
|
||||||
} else if (colors.size() > 2) {
|
} else if (colors.size() > 2) {
|
||||||
return GenerateComplexGradient(size, colors, rotation, progress);
|
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) {
|
if (colors.size() == 1) {
|
||||||
result.fill(colors.front());
|
result.fill(colors.front());
|
||||||
return result;
|
return result;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue