Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
455 B
C++
Raw Permalink Normal View History

// Copyright 2018 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
2018-07-07 00:40:15 +02:00
#include "DolphinQt/QtUtils/ImageConverter.h"
#include <QPixmap>
#include "UICommon/GameFile.h"
QPixmap ToQPixmap(const UICommon::GameBanner& banner)
{
2025-06-07 11:18:27 +01:00
const auto* ptr = reinterpret_cast<const uchar*>(banner.buffer.data());
QImage image(ptr, banner.width, banner.height, QImage::Format_RGBX8888);
return QPixmap::fromImage(std::move(image).rgbSwapped());
}