I am loading large PNG image with stb image library. Following code works with other images, so I'm quite sure the code around is correct.
int width = 0, height = 0, nrChannels = 0;
unsigned char* data = stbi_load(file_name, &width, &height, &nrChannels, 0);
cout << " - Image color channels: " << nrChannels << endl << flush;
if (data) {
...
} else {
DIE_WITH_ERROR(); <-- Error raised here
}
nrChannels was also 0 after loading. It's RGBA PNG image of size 166800x1029 px - 38.5 MB
other semi-transparent rgba images in same folder work fine.
Is problem the size of the image? What is the largest image I can use?
Some image properties: