+1  A: 

Can you cache the thumbnails as small image files alongside the main file?

Martin Beckett
Thank you! I've made a cache for store thumbnails with the image, of course, it makes no difference at the first time. So I need a lib which can decode images directly into thumbnails without decode total images. I mean I need a Image decoder.
A: 

As suggested by mgb, a cache is probably the solution: in Windows Explorer, when you switch to the move with image preview, it creates a system, hidden file named thumbs.db in the directory it displays. I think you can do something similar.

Or even better, force the creation and use such DB, since it is a standard. According to TriD, it is a "Generic OLE2 / Multistream Compound File".

PhiLho
A: 

Regarding storing the thumbs in the DB you may take a look at Storing Images in DB - Yea or Nay?

cherouvim
thanks! I do not use blob to store the images in DB, but write my own DB files for store the image file stream.