use new phosg::Image class

This commit is contained in:
Martin Michelsen
2025-07-01 09:56:42 -07:00
parent 072e647c7b
commit 0a5065707c
8 changed files with 65 additions and 87 deletions
+2 -2
View File
@@ -966,10 +966,10 @@ void ServerState::load_config_early() {
} else if (lower_path.ends_with(".gvm")) {
decompressed_gvm_data = phosg::load_file(path);
} else if (lower_path.ends_with(".bmp")) {
phosg::Image img(path);
auto img = phosg::ImageRGBA8888::from_file_data(phosg::load_file(path));
decompressed_gvm_data = encode_gvm(
img,
img.get_has_alpha() ? GVRDataFormat::RGB5A3 : GVRDataFormat::RGB565,
has_any_transparent_pixels(img) ? GVRDataFormat::RGB5A3 : GVRDataFormat::RGB565,
std::format("bnr{}", banner_index),
0x80 | banner_index);
banner_index++;