Skip to content

Commit

Permalink
Qt: Always use ARGB32 for padded cover images
Browse files Browse the repository at this point in the history
Fixes black background around non-square covers.
  • Loading branch information
stenzek committed Feb 17, 2025
1 parent 31a5d8c commit 78bd0fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/duckstation-qt/gamelistmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 78bd0fd

Please sign in to comment.