图片类
This commit is contained in:
@@ -9,10 +9,21 @@
|
||||
#include "pixel.h"
|
||||
#include "misc/mapped_file/mapped_file.h"
|
||||
#include "stb_image_loader.h"
|
||||
#include "render/render_image.h"
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
mirage_app::get().init();
|
||||
|
||||
auto file = mapped_file::create();
|
||||
file->map_file(L"Z:/Root/Local/NanakoDisk/涩图/可爱偷猴计划/东风谷早苗/57092520_p1.jpg");
|
||||
|
||||
stb_image_loader image;
|
||||
image.init(file->get_data(), file->get_size());
|
||||
const auto& heap = image.load();
|
||||
|
||||
render_image i;
|
||||
i.create(heap->data, { heap->info.width, heap->info.height }, heap->info.get_pixel_format());
|
||||
|
||||
const auto& window = mwindow::create({ 800, 600 }, L"Hello, World!");
|
||||
window->set_content(
|
||||
std::make_shared<mbutton>()
|
||||
|
||||
Reference in New Issue
Block a user