^ What's the point?
^ Basic usage

Professional Thumbnailer Library

Professional Thumbnailer Library is a DLL for use in Win32 and Win64 software.
The library is based on a FIFO list and a thread pool. Just add a thumbnail request to the library and the threads extract and process the request one-by-one and return the thumbnail in a callback.
  • High quality resize
  • Multi-threaded so as fast as reasonably possible
  • Accepts 4 inputs: file name, PIDL, HBitmap handle and in-memory "picture files"
  • Options to add configurable shadow effect, and film frame effect for video thumbnails (both at the same time if needed)
  • Each thumbnail request has its own parameters
  • Supports all picture files Free Image Library supports
  • Supports all cover arts Tags Library supports
The component can be evaluated freely. If you like it and decide to use it in a freeware, shareware or commercial (or any other money making - advertising, in app. selling, etc.) product one of the licenses is needed.

Basic usage

1. Create an instance with:
  • ProfessionalThumbnailer_Create()
2. Add thumbnail request(s) with:
  • ProfessionalThumbnailer_AddFileName()
  • ProfessionalThumbnailer_AddPIDL()
  • ProfessionalThumbnailer_AddHandle()
  • ProfessionalThumbnailer_AddMemory()
The 'TPTAddParameters.Callback' must be specified else the add functions will fail.
If the functions return 'False' do not forget to free any 'User' etc. objects - normally free them eg. in the callback.
These are non-blocking calls, once a thumbnail request has been added to the queue these functions return and the threads will process the requests and return the thumbnails handle in the callback as fast as possible.
The callback is called from the worker threads so be aware that the callback code is running in a separate thread and also the specific worker thread is paused until the callback returns.

3. Free the instance if finished with:
  • ProfessionalThumbnailer_Free()
To cancel all the added requests call:
  • ProfessionalThumbnailer_Clear()
Note that this will not cancel the jobs currently processing just clears the job list.
The callback may (and surely will) still return previously requested thumbnails, use the 'TPTThumbnailParameters.ListingID' to check if the thumbnail is from a previous or current listing.

There are 4 blocking functions to request a thumbnail without threading:
  • ProfessionalThumbnailer_GetFileNameThumbnail()
  • ProfessionalThumbnailer_GetPIDLThumbnail()
  • ProfessionalThumbnailer_GetHandleThumbnail()
  • ProfessionalThumbnailer_GetMemoryThumbnail()
The thumbnail handle is returned in the 'BitmapHandle' variable.
It's safe to call these functions in threads too though.