By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 1,726 Online
Bytes IT Community
Submit an Article
Got Smarts?
Share your bits of IT knowledge by writing an article on Bytes.

VB6 thumbnails the easy (and fast) way

Expert 5K+
P: 8,434
Hi all.

Just wanted to pass along the benefit of my experiences in producing thumbnail images in VB6 for a project I was working on.

I needed to take a bunch of images (JPG, GIF, whatever) from disk and produce smaller thumbnail versions to store for my own purposes. I had coded the conversion myself, and it worked just fine. However, it was very slow. For a typical photo from a digital camera, even on a decent not-too-old PC (brand-new fast games machine circa 2010) it could take 20-30 seconds. Obviously something better was needed.

Search results here and elsewhere on the web showed that the same issue has come up numerous times over the years, and the responses vary quite widely. Generally it involves some specific product such as FreeImage which produces thumbnails, often there are convoluted API calls involved.

In the end though, I did it myself. By creating a second picturebox and using the PaintPicture method, I simply copied the original image to the size I wanted in the new picturebox, then read it from there. Total time per image, maybe a second if it's a big one.
Apr 22 '12 #1
Share this Article
Share on Google+