Add LICENSE

This commit is contained in:
2025-09-08 20:58:18 -05:00
parent f26b831fc9
commit a700dbda74
4 changed files with 33 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
// This program simply loads a QOI file into Allegro
// as a texture and then dumps the texture data as a PNG.
// Take notice of lines 26 and 27. You only need to initialize
// Take notice of lines 32 and 33. You only need to initialize
// the QOI plugin (this registers the function hooks that Allegro
// will use whenever you want to I/O on a filename ending in .qoi)
//
@@ -21,10 +21,17 @@ int main(int argc, char **argv) {
printf("Usage: sample <filename>\n");
return 0;
}
al_init();
al_init_image_addon();
al_init_qoi();
// We don't want to multiply color by alpha because
// we're writing back to another image here, in a
// game you would leave this flag unset.
al_set_new_bitmap_flags(ALLEGRO_NO_PREMULTIPLIED_ALPHA);
ALLEGRO_BITMAP* bmp = al_load_bitmap(argv[1]);
al_save_bitmap("out.png", bmp);
return 0;
}