save_tga(3alleg4)

✨ save_tga ✨

okay so bestie, we're in the Allegro manual, and today's main character is save_tga β€” she saves a bitmap into a TGA file. that's it, that's the vibe. πŸŽ€


🌸 NAME 🌸

save_tga β€” saves a bitmap into a TGA file. part of the Allegro game programming library, iykyk. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <allegro.h>

int save_tga(const char *filename, BITMAP *bmp, const RGB *pal);

like, three args, no drama. we love a low-maintenance queen. πŸ‘‘


πŸ’– DESCRIPTION πŸ’–

so here's the tea: save_tga writes a bitmap into a TGA file. and not just any TGA file β€” she's flexible, she's versatile, she's giving range. 🌈

the file she writes can be any of these, no cap:

  • 256-color
  • 15-bit hicolor
  • 24-bit truecolor
  • 32-bit truecolor+alpha

literally obsessed with her for that. pick your format, she'll handle it. ✨


⭐ RETURN VALUE ⭐

returns non-zero on error. so like, if you get anything that isn't zero, that's your sign something went off. zero is the slay outcome. πŸ’€βž‘οΈπŸ’–


πŸŽ€ SEE ALSO πŸŽ€

  • save_bitmap(3alleg4) β€” her sister, also iconic, go say hi 🫢

and that's the whole page, bestie! this was Allegro version 4.4.3, manual section 3alleg4, and the page is literally called save_tga. mwah. go forth and save those TGAs. πŸ’œπŸŒΈβœ¨