Here's a humble quick shot from a beginner in .NET. Hope you use Windows, and I'd appreciate comments. Perhaps it isn't even faster. Here goes
Needs["NETLink`"];
LoadNETType["System.Drawing.Image"];
LoadNETType["System.Drawing.Imaging.ImageFormat"];
LoadNETType["System.IntPtr"];
LoadNETType["System.Windows.Forms.Form"];
LoadNETType["System.Windows.Forms.FormBorderStyle"];
LoadNETType["System.Windows.Forms.ImageLayout"];
Module[{tmpDirName = "myThumbnails", tmpDir, del},
tmpDir = FileNameJoin[{$TemporaryDirectory, tmpDirName}];
Quiet@CreateDirectory[tmpDir];
del = NETNewDelegate["System.Drawing.Image+GetThumbnailImageAbort",
Null &];
createThumbnail[filename_String, {width_, height_}] :=
NETBlock[(Image`FromFile[filename])@
GetThumbnailImage[width, height, del, IntPtr`Zero]];
previewThumbnail[netobject_] := Module[{frm},
frm = NETNew["System.Windows.Forms.Form"];
frm@Height = netobject@Height + 40; frm@Width = netobject@Width;
frm@FormBorderStyle = FormBorderStyle`FixedDialog;
frm@BackgroundImageLayout = ImageLayout`Center;
frm@BackgroundImage = netobject;
ShowNETWindow[frm]];
getThumbnail[netobject_] :=
With[{fn = FileNameJoin[{tmpDir, "tmp.bmp"}]},
netobject@Save[fn, ImageFormat`Bmp];
Import[fn]
]
];
Usage:
thumb = createThumbnail[
imagePath, \
{100, 80}];
Now, previewThumbnail[thumb] shows a little window with the thumbnail and getThumbnail[thumb] loads it into Mathematica