MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / LoadImage

Function LoadImage

Applications/ImgView/main.cpp:17–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15surface_t image;
16
17int LoadImage(char* path){
18 if(!path){
19 Lemon::GUI::DisplayMessageBox("Image Viewer", "Invalid Filepath");
20 return 1;
21 }
22
23 int ret = Lemon::Graphics::LoadImage(path, &image);
24
25 if(ret){
26 char msg[128];
27 sprintf(msg, "Failed to open image, Error Code: %d", ret);
28 Lemon::GUI::DisplayMessageBox("Image Viewer", msg);
29 return ret;
30 }
31
32 return 0;
33}
34
35void OnWindowCmd(unsigned short cmd, Lemon::GUI::Window* win){
36 if(cmd == IMGVIEW_OPEN){

Callers 6

OnWindowCmdFunction · 0.70
mainFunction · 0.70
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50

Calls 1

DisplayMessageBoxFunction · 0.85

Tested by

no test coverage detected