Home > Software design >  How to open fli files
How to open fli files

Time:05-10

I'm new to C and was tasked with processing a fli file, but have no idea how to open them correctly. So far my code looks like this:

#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main() {
    fstream newfile;
    newfile.open("testvid.fli", ios::in);object
    if (newfile.is_open()) {
        string tp;
        while (getline(newfile, tp)) {
            cout << tp << "\n";
        }
        newfile.close();
    }
    std::cin.ignore();
}

But it gives me gibberish. Can anyone help?

CodePudding user response:

I haven't worked with .fli files before. Is it a FLIC file (used to store animations)? Then it makes sense that trying to reading them as strings produces gibberish. You could try either the Aseprite FLIC Library or LibFLIC.

  • Related