reading part of a bitmap into a texture?

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”);

Is there a auxDIB section load?

Thanks
Patrick

why not just chop it up yourself?

Originally posted by Gavin:
why not just chop it up yourself?

Because its for a pathologist who will not waste time chopping up images.

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…

Gavin,

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.

No I have heard of that? could you explain?

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.

are you using C?

Using V C++ 6.0.

Originally posted by Gavin:
are you using C?

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.

Ok Cheers,

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.