E
E
Evgeny Petryaev2020-08-22 16:07:51
C++ / C#
Evgeny Petryaev, 2020-08-22 16:07:51

How to read tga file?

I use this code

FILE *f;
fopen_s(&f, "Screen.tga", "r");
char* buffer =new char[10240000];
    if (f != NULL)
    {
        int countfile = 0;
        while ((buffer[countfile++] = getc(f)) != EOF)
            ;
        fclose(f);
    }

But it does not read to the end, it seems that a buffer from charms is definitely needed

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question