17 lines
374 B
Plaintext
17 lines
374 B
Plaintext
#import "modules/std.sx";
|
|
stb :: #import "modules/stb.sx";
|
|
|
|
main :: () -> s32 {
|
|
w: s32 = 0;
|
|
h: s32 = 0;
|
|
ch: s32 = 0;
|
|
img := stb.stbi_load("test.png", @w, @h, @ch, 4);
|
|
if xx img != 0 {
|
|
print("loaded {}x{} ({} channels)\n", w, h, ch);
|
|
stb.stbi_image_free(xx img);
|
|
} else {
|
|
print("no image (expected in test)\n");
|
|
}
|
|
0;
|
|
}
|