LIBANSILOVE(3)

🌸 hey bestie, welcome to the libansilove(3) manual page πŸ’–

like, ok, sit down, grab a strawberry drink πŸ“, because we're about to talk about the most iconic little library in the artscene.


✨ NAME ✨

okay so libansilove β€” a whole library for converting ANSI, ASCII, and other formats into PNG images. yes, literally that. no cap. πŸ‘‘


πŸ’… DESCRIPTION πŸ’…

so libansilove is a library that converts ANSI and artscene related file formats into PNG images, and the format list is giving range, bestie. it supports:

  • ANSI (.ANS)
  • PCBoard (.PCB)
  • Binary (.BIN)
  • Artworx (.ADF)
  • iCE Draw (.IDF)
  • Tundra (.TND)
  • XBin (.XB)

it creates size optimized 4-bit PNG files πŸŽ€ β€” like, tiny but gorgeous, the way we like it β€” and it supports 80x25 and 80x50 PC fonts (including all the 14 MS-DOS charsets, yes ALL of them, she's thorough), Amiga fonts, and iCE colors. obsessed honestly. ✨

🫢 real talk though: every single library function takes a context, defined as an ansilove_ctx structure in include/ansilove.h:
struct ansilove_ctx {
        uint8_t *buffer;
        size_t maplen;
        size_t length;
        struct ansilove_png png;
        uint8_t error;
};

and options get passed to the different loaders using the ansilove_options structure, also in include/ansilove.h:

struct ansilove_options {
        bool diz;
        bool dos;
        bool icecolors;
        bool truecolor;
        int16_t columns;
        uint8_t font;
        uint8_t bits;
        uint8_t mode;
        uint8_t scale_factor;
};

like, that's the whole vibe. structs stay structs. πŸ’œ


πŸ‘‘ AUTHORS πŸ‘‘

libansilove was written by Stefan Vogt, Brian Cassidy, and Frederic Cambus. the founding mothers of the function, honestly β€” legends only, main character energy fr fr. 🌈⭐


and that's the page, bestie πŸ¦‹ this one came from the Debian crew, dated March 22, 2025 β€” so if you're reading it, that's the version you're holding. slay, bye πŸ’…πŸ’–

πŸ“¦ where this page comes from