Files
NJU_PA/navy-apps/tests/bmp-test/main.c
tracer-ics2023 75edc9925a > compile NEMU
221220000 张三
Linux zzy 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
 22:07:29 up 7 days, 22:07,  1 user,  load average: 0.41, 0.34, 0.28
2024-09-25 22:07:29 +08:00

20 lines
360 B
C

#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <NDL.h>
#include <BMP.h>
int main() {
NDL_Init(0);
int w, h;
void *bmp = BMP_Load("/share/pictures/test.bmp", &w, &h);
assert(bmp);
NDL_OpenCanvas(&w, &h);
NDL_DrawRect(bmp, 0, 0, w, h);
free(bmp);
NDL_Quit();
printf("Test ends! Spinning...\n");
while (1);
return 0;
}