VB5: Need Ultra Fast Image Loading code
Posted on 1999-09-17
I've got a massive project on hand with a few major problems. I'm doing some extensive animations within the project with raw images as well as moving the image around the screen itself. The catch is, I'm NOT using avi's or any type of animation file. AVI's ruin the quality of the image and/or can't be displayed without skipping horribly. My program is at 800x600x24-bit. I first tried using loadpicture to load up images off the hard drive into a picture box to animate it. This proved to be an extremely slow method that didn't work well. Next I tried putting all my images into an image list. This didn't work either because it flat out wouldn't allow it...ran out of memory it said. So then I went and made 24 seperate image boxes and loaded each frame of the animation into it's corisponding image box. This worked well. On my P2 400, it animates very smoothly at 800x600...something that can't be done with avi's as of yet. But here's the big problem. I need it to run on systems a little less powerfull then mine too, and animate smoothly. Plus, it flat out refuses to compile the program, stating it's out of memory. (I've got 256mb of ram btw...love to know where it went). So in a nutshell the idea here is to have very sharp images loaded very quickly from the hard disk to animate smoothly. But unless there's some serious API code to load it quicker and draw it quicker then a standard image box, I don't know what I can do. My only other option would be to make it an avi that's 320x200 and stretch it (which would make it look terrible) to fit 800x600. However if there was some routine that can make it animate with black lines as every other pixel row to stretch it to full screen, this would look a little better then pixel doubling/tripling. I'm out of solid ideas for it....but my first hope is a fast api to load and display large images very very quickly....and I'll raise the point value based on if someone comes up with a good solution.