mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-07 12:05:52 +00:00
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)
|
if (image->height() < dpr_expected_height)
|
||||||
yoffs = static_cast<int>(static_cast<qreal>((dpr_expected_height - image->height()) / 2) / dpr);
|
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.setDevicePixelRatio(dpr);
|
||||||
padded_image.fill(Qt::transparent);
|
padded_image.fill(Qt::transparent);
|
||||||
QPainter painter;
|
QPainter painter;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user