Large Images
Bwain| No Comments »So I’ve got a HUGE image that’s 18000×9000, and I can’t open it with the DevIL library. The library tries to allocate the entire image all at once, and it throws an ‘out of memory’ error. (Did you ever think you would actually NEED 64 bit architecture?) The Adobe image viewer can open and view it, so I know its a valid image. I’ve chosen the ‘png’ library to link to and implement outside the DevIL library to see if I can do a progressive load and progressive display. Hope this doesn’t take too long, but its definitely a necessary step in the evolution of the application.
Got a copy of the zlib library here, and a copy of the png library here. They were somewhat difficult to build. Found a png how-to here. The Png reader/writer seems to be full featured, so I’m certain its up to the task for doing progressive reads.
The image viewer needs:
- Display which input is being shown from the buffer node
- Display zoom level
- Init zoom level to 1
For the progressive view mode, it needs one scanline per display pixel. All panning needs to snap to the nearest scanline. A zoom calculates new scanline positions to be displayed. Have to find some logic for reusing as much data as possible when panning and zooming.
I’ve implemented the simple viewer features listed above. So there are two display modes: One that allocates the entire image at once, and one that allocates view dependent scanlines. ‘GlView::pixBuffer’ is the buffer used to hold the image, so if I focus on all methods that deal with pixBuffer, and provide equivalent functionality for the scanlines, I should be able to swap out each method. The array of scanlines will be a new object called ViewDepScan.


