Can anyone suggest a way to read in a part of a bitmap into a texture. The image that I’m loading is 1Gb so I can’t load the whole image, as it’s so big and it would slow my processes down.
I’m currently using :
AUX_RGBImageRec *texture1;
texture1 = auxDIBImageLoad(“Data/bit.bmp”);
I meant why don;t you write code to chop it up… I don;t see the problem…
pick the width/height of the txture you want to use, after checking the max size, and then after you have loaded the whole image split it up into these sizes…
Will this not take a age to load as the whole 1Gb image will have to be loaded into RAM?
Originally posted by Gavin: I meant why don;t you write code to chop it up… I don;t see the problem…
pick the width/height of the txture you want to use, after checking the max size, and then after you have loaded the whole image split it up into these sizes…
just use low level io. If it does take too long then you just read the part you need from the file. I assume you know about fseek, read (as opposed to fscanf) etc.
Originally posted by Gavin: just use low level io. If it does take too long then you just read the part you need from the file. I assume you know about fseek, read (as opposed to fscanf) etc.
just try it the simple way to start with by reading the whole file in and the extracting the ‘block’ of the bmp that you need, it may be quick enough for you.
Originally posted by Gavin: just try it the simple way to start with by reading the whole file in and the extracting the ‘block’ of the bmp that you need, it may be quick enough for you.