Yup, that was it. I modified it to dispose properly. Since I didn't have the *.pfx file I couldn't sign the file, so I just created the class in my own project and modified the web.config to point to the new thumbnail handler (leaving the IZ assembly intact).
/// <summary>
/// Based on IZ.WebFileManager.ThumbnailHandler, but fixed disposing of Image.
/// </summary>
public class ThumbnailHandler : IHttpHandler
{
public bool IsReusable
{
get { return true; }
}
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "image/jpeg";
int size = 92;
string vPath = HttpUtility.UrlDecode(context.Request.Url.Query.Substring(1));
string path = context.Request.MapPath(vPath);
Image thumb = null;
try
{
using (Image original = Image.FromFile(path))
{
if (original.Width > size || original.Height > size)
{
int tw = original.Width > original.Height ? size : (original.Width * size) / original.Height;
int th = original.Width > original.Height ? (original.Height * size) / original.Width : size;
thumb = original.GetThumbnailImage(tw, th, null, IntPtr.Zero);
}
else
{
thumb = original;
}
}
thumb.Save(context.Response.OutputStream, ImageFormat.Jpeg);
}
finally
{
if (thumb != null)
{
thumb.Dispose();
}
}
}
}