Qt: Always use ARGB32 for padded cover images
Fixes black background around non-square covers.
This commit is contained in:
parent
31a5d8c481
commit
78bd0fdf3e
|
@ -51,7 +51,7 @@ static void resizeAndPadImage(QImage* image, int expected_width, int expected_he
|
|||
if (image->height() < dpr_expected_height)
|
||||
yoffs = static_cast<int>(static_cast<qreal>((dpr_expected_height - image->height()) / 2) / dpr);
|
||||
|
||||
QImage padded_image(dpr_expected_width, dpr_expected_height, image->format());
|
||||
QImage padded_image(dpr_expected_width, dpr_expected_height, QImage::Format_ARGB32);
|
||||
padded_image.setDevicePixelRatio(dpr);
|
||||
padded_image.fill(Qt::transparent);
|
||||
QPainter painter;
|
||||
|
|
Loading…
Reference in New Issue