-
Displaying images
Hi,
In my app, i let the user to select a folder which's got image files in it. When user selects the folder, i must display thumbnailes of the image files, on my dialog window (like in Webshots or ACD see). What's the simplest way to do this? I've thought of creating buttons and displaying the images on those buttons. But again, how can i display a image file on the disk on a button?
Thanks.
-
The easiest way to do this is to use an image loader. The image loader would be code that someone else has written that would load the image into memory, and convert it to a useable format.
For instance, for JPG files you could use the code at http://www.voicenet.com/~richgel/
Writing library functions for all the different types of images would be tedious on your own, that's why it's a good idea to search for code that other people have already written.
-
Thanx. i'll try that.
Any other suggestion?
-
Try looking for the GD library (http://www.boutell.com/gd/). Very handy
-
-
GDI+ will handle many common image formats. Is included with later versions of MSVC.
ImageSource is very good (from SmallerAnimals Software) not free.
Create a buffer DC to hold composite image or drawing will be too slow when paint called.
GetDC()
CreateCompatibleDC()
CreateComaptibleBitmap()
SelectObject()
ReleaseDC()
DeleteObject()
BitBlt()