Hmmm, i cannot still find it in english wiki page.
Anyway, i understand how to open the images, but i don't understand how to declare the buffer.
I understand this in other words:
//Let's read the image file
buffer = read_test.GetFile("test7b.bmp");
if (buffer==NULL)
{
//simple error catch
std::cout<<"Read error"<<std::endl;
return EXIT_FAILURE;
}
//Ok, now we can load the image by using memory instead of a file
i1.LoadFromMemory(buffer, read_test.GetFileSize("test7b.bmp"));
//SFML instructions
s1.SetImage(i1);
Which is the image loading code.
But i do not understand some of the code above, as how to declare the buffer, create it.
As i understand is, that buffer is a chars array, in which the images are stored. But how to make that - i don't know.
Here's what i have:
A program, which allows me to put images into a datafile file and create header file according to that.
So i would basically need to access that with buffer, and load the images to the buffer, and then read the images from the buffer.
Anyway, i don't quite understand how to do all this, even with the code... Don't forget, that i'm still a newbie to programming, compared.