Loading (streaming) images?

Blitz3D Forums/Blitz3D Beginners Area/Loading (streaming) images?

ervin(Posted 2007) [#1]
Hi all.

I'm trying to load images of any size, and of course there are limits to how big an image can be before problems arise.

Ideally, I'd like to be able to have b3d split the image into 256x256 squares WITHOUT loading the whole image first.

Can b3d do something like this?
Or can an image be streamed somehow?


andy_mc(Posted 2007) [#2]
you mean like how second life loads textures as you walk around? It's a procedual JPG thing I think.


ervin(Posted 2007) [#3]
Not quite, but I guess the concept could still be applied to what I'm trying to do...
I'm simply trying to load an enormous image into B3D, to display on a mesh made up of lots of quads.

[EDIT] I've made some progress using FreeImage and the decls for it by markcw. I've been able to FreeImage_Load a 11628x16116 image, and extract part of it to image->texture->brush->surface.
Hopefully this method will prove useful for the entire mesh to be textured... I'll have to be diligent with freeing resources once they're no longer required, to manage memory usage.
I'm using a mesh made up of 46x63=2898 quads (I calculate the number of quads required, based on the image dimensions), painted with textures that are 256x256 big.