QuickThumb v0.21 Copyright (c) 2003 by Michael Barrientos. All rights reserved. mbarrien@geocities.com http://mb.n3.net/projects/ -------- Overview -------- QuickThumb is a QuickTime thumbnail handler for Windows Explorer. When Explorer is in thumbnail view (whether it be in an Explorer window or in a File Open dialog box), Windows will use this handler to read thumbnail pictures from QuickTime movies. ------------------------------- Build Requirements/Instructions ------------------------------- Building QuickThumb requires Visual Studio and Apple's QuickTime APIs. I have only tested builds on Visual Studio .NET and QuickTime 6, although there is nothing in the project that prevents it from being compiled using QuickTime 5.0.1. The project may or may not compile using Visual Studio 6; it is untested. The QuickTime Windows APIs can be downloaded from http://developer.apple.com/sdk/index.html#QTInt Building in Visual Studio is as simple as pressing Shift-Ctrl-B. (^_^) --------------------------- Installation/Uninstallation --------------------------- Install: 1. Copy QuickThumb.dll to your System32 directory (e.g. C:\WINDOWS\SYSTEM32) 2. As an Administrator, from the System32 directory, run "regsvr32 QuickThumb.dll". You should get a message saying registration was successful. Uninstall: 1. As an Administrator, from the System32 directory, run "regsvr32 /u QuickThumb.dll" ------- Running ------- Since this is a Windows Shell Extension, there is no application to run. A test application which I used to test the program is included, call QuickThumbTest. Running it is as simple as double clicking, the using the standard menus to navigate around and open QuickTime files. Currently, it is dependent on the directory structure. --------------- Troubleshooting --------------- When installing the program, you may get the message "LoadLibrary("QuickThumb.dll") failed - The specified module could not be found." This message means that the computer is missing a DLL, most likely MSVCR70.DLL (Microsoft Visual C++ 7.0 Runtime Library). This file should be in C:\WINDOWS\SYSTEM32. If you do not already have it, you can download a copy from . Copy it to the directory, then try installing again as above. --------- Internals --------- There is nothing too special about the internals. The internals are pretty straightforward, creating QuickTime movie objects, then doing a series of conversions from the thumbnail pic in Apple PICT format to a device-independent bitmap (DIB), to a Windows device-dependent bitmap (DDB). There were a few twists and turns along the way. The QuickTime API hid the methods of converting PICTs into DIBs pretty well (the documentation focuses on MacOS specific calls, which obviously doesn't focus on the Windows calls). Also, the Windows APIs for graphics are a huge mess! There was no easy way to turn the DIB byte stream into a DDB, and instead required deciphering the stream to get pointers to structures within it. Much thanks to Google for pointing me at documentation (not Microsoft provided) for deciphering the DIB buffers! ----------------- Interesting facts ----------------- This project was created in November 2002, to help me get familiar with programming for Windows. It took me about 2 weeks (between my job hunting) to decipher all the relevant APIs, all for the first time, including MFC, ATL, COM, and Apple QuickTime APIs, along with the methods of registering DLLs, loading DLLs, etc. That was a pain in the ass, but well worth the exercise. Why'd I pick this? Well, I have collected various movies and have always liked the thumbnails that Windows Media Player files have to be able to see at a glance what's in the file. I happen to have a lot of QuickTime movies, so I decided to write my own handler. ---------- Known bugs ---------- * For some QuickTime movies, we get a full white screen, even if we change it to take a thumbnail from some other point in the first few seconds of the movie. * Although untested, the thumbnail image will probably be of poor quality in Windows ME. StretchBlt didn't support halftoning until Windows 2000. ----- To do ----- * Figure out how to use QuickTime API to do image scaling. (Better quality?) * Add property sheet handlers to allow users to specify options about the picture extraction. * Add an icon handler? * Simplify/User friendlify installation. * Implement a caching system * Add support for other formats (my first priority is Real player video files) ------- Credits ------- codeguru.com - For pointing out why using StretchBlt without halftoning Andrew Troelsen - For writing the excellent book "Developer's Workshop to ATL and COM 3.0". After reading the book, suddenly everything made sense (and I realized how many dumb things I was doing in v0.01). Borders - For letting me sit in the store and read the above book since I can't afford the $50 right now. (Give me a job!) ------- History ------- v0.01 (12/16/02): Initial Release v0.20 (3/16/03): Made free threaded, merged proxy and stub, changed CLSID, removed IQuickThumb interface, fixed GetLocation to return ASYNC flag, uses half-toning, moved QTML initialization to ExtractImage instead of constructor (so it can be backgrounded), made aspect ratio aware, removed GetQuickThumb function from DLL, changed test app to use DllGetClassObject v0.21 (3/28/03): Fixed bug when deleting movie files (fixed null pointer on priority), changed to use Windows shell string manipulation methods. Build no longer Win98 optimized to save file size. (Besides, thumbnails don't show up until WinME.)