03-15-2018, 09:23 PM
(This post was last modified: 03-15-2018, 09:41 PM by pahendriks.)
Hi,
In the book you say (section: Add some code, picture of Lenna): After the FileHandler add this code:
MyFiles FileHandler;
int Width, Height;
char* OurRawData = FileHandler.Load((char*)"../Lenna.png", &Width, &Height);
if (OurRawData == NULL) printf("We failed to load\n");
WHERE do I have to put this code? In which file and on which location?
Best Regards, Patrick
update: it seems that putting it after this line in MyFiles.cpp is the place to be:
unsigned char *data = stbi_load(filename, width, height, &comp, 4);
In the book you say (section: Add some code, picture of Lenna): After the FileHandler add this code:
MyFiles FileHandler;
int Width, Height;
char* OurRawData = FileHandler.Load((char*)"../Lenna.png", &Width, &Height);
if (OurRawData == NULL) printf("We failed to load\n");
WHERE do I have to put this code? In which file and on which location?
Best Regards, Patrick
update: it seems that putting it after this line in MyFiles.cpp is the place to be:
unsigned char *data = stbi_load(filename, width, height, &comp, 4);