One other question.

Trying to load up the file I'm using gave me this:
First chance exception at $7C812A5B. Exception class EInvalidGraphic with message 'DIB is invalid'.
I assume this is because the file I'm trying to open isn't in DIB format. (It's a PNG.) I've already got a routine written to open the file and convert it, from before I got your example.

Code:
   dlgOpen.Filter:='All images: '+BitmapLoaders.GetLoadFilter;
   if dlgOpen.Execute then
      filename := dlgOpen.FileName;
      with TLinearBitmap.Create do
      try
         imgLoaded.Picture:=nil;
         LoadFromFile(dlgOpen.FileName);
         AssignTo(imgLoaded.Picture.Bitmap);
      finally
         Free;
      end;
   //end if
(imgLoaded is a TImage control.) What would be the best way to merge this with your code, so the dib object gets its picture from the (now decoded) imgLoaded instead of trying to bring it in straight from the file? Or is there a better way?

Thanks for your patience,

Mason