mirror of
https://github.com/zs-yg/kortapp-z.git
synced 2025-12-06 16:10:42 +08:00
Add files via upload
This commit is contained in:
@@ -272,6 +272,6 @@ void MainWindow::convert_cb(Fl_Widget* w, void* data) {
|
|||||||
if (success) {
|
if (success) {
|
||||||
fl_message("转换成功!");
|
fl_message("转换成功!");
|
||||||
} else {
|
} else {
|
||||||
fl_alert("转换失败,请检查输入文件!");
|
fl_alert("转换失败,请检查输入文件!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ ImageData ImageLoader::load(const std::string& path) {
|
|||||||
throw std::runtime_error("无法解码WebP图像");
|
throw std::runtime_error("无法解码WebP图像");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果没有alpha通道,转换为RGB格式
|
// 如果没有alpha通道,转换为RGB格式
|
||||||
if (data.channels == 3) {
|
if (data.channels == 3) {
|
||||||
uint8_t* rgb_pixels = new uint8_t[data.width * data.height * 3];
|
uint8_t* rgb_pixels = new uint8_t[data.width * data.height * 3];
|
||||||
for (int i = 0; i < data.width * data.height; ++i) {
|
for (int i = 0; i < data.width * data.height; ++i) {
|
||||||
|
|||||||
Reference in New Issue
Block a user