I am capturing high resolution images with a frame grabber. Processing of these images will take place on the high res version, but for display purposes I want to show something a little more lightweight. On capture, I need to be able to scale the image in the canvas to fit, but I also need to drag it around the canvas and zoom in on parts of it up to 100% of its original size.
Right now I’m doing this using the MouseWheel and MouseDrag events and handling scaling in the paint event, and it works. But on a 16bit 14,000 x 10,000 pixel image, so it’s incredibly slow. …As you might expect.
I need to be able to view the image at 100% sometimes, so I can’t simply scale the image down and then blow it back up, because I need to be able to do some pixel peeking on this in my application, look at focus, etc. I need a way to quickly manipulate the original high resolution image, quickly, within this canvas.
My thought was to reduce the bit depth to something like 8 bit, which should get me partway there without too much compromise. A 14k image is still going to be pretty slow to move around though even at 8 bits. I can’t seem to find a Xojo way to do this.
Any other suggestions for reducing the size of the image in the canvas so that I can manipulate it in a quicker way? I’m not 100% opposed to compression but it would have to be super light, because I need to be able to look at something as close as possible to the original image.
I am looking for a platform independent way to do this. We’re making the app for Windows, but may eventually use it on the mac as well.