Version 2.6 released!

It's been almost a year since the last version was released. In a way, it's good - the last version was very stable and secure. In the last year, hundreds of customers have bought and installed the product, and less than a dozen have encountered any bugs. Still, it's time to roll out new features and patch a few bugs. 12 new features and six bug fixes! The most common bug was a compatibility issue with  a small percentage of IIS configurations. The error message was "Value cannot be null. Parameter name: user". Other bugs included a rare rounding bug where certain images would get cropped by 1 pixel, a bug with border widths,  a low-trust compatibility issue with reflection, and one locking issue that could happen if the /imagecache directory kept getting manually deleted during high traffic. The only security or reliability-related bug affected URL authorization, but did NOT EXIST IN ANY PUBLISHED VERSION. Only customers that got a custom build via e-mail are affected, and are being sent a notice.

Fixed

  • Fixed bug where a NullReference exception would occur if the Authentication module didn't process the request. All requests appear anonymous now in that situation.
  • Fixed rounding bug and added regression test. New behavior is to round ALL values before performing drawing, but AFTER math is done. Was previously trimming a line of pixels off certain images.
  • Fixed border bug where border was drawn over top of padding.
  • Fixed threading bug with creating the web.config file. Two concurrent requests immediately after installation would cause 1 and only 1 exception.
  • Fixed bug where no URL Authorization was occuring UNLESS DisableImageURLAuthorization=TRUE in web.config (This bug did not exist in v2.1b, only in custom versions sent to customers between Mar. 19 and Nov. 11)
  • Fixed SecurityException errors occuring on GoDaddy and in other low-trust environments: changed the Animation plugin to use static methods insead of reflection. Users of the animation plugin, contact me for an updated version.

    Added

    • Added support for splitting the image cache into subfolders, allowing scalability to millions of images: Just set "ImageCacheSubfolders" to the required number of folders.
    • Added static event hooks for URL rewriting on images (replaces CustomFolders.cs, although CustomFolders.cs still works). CustomFolders.cs will be removed in the next major revision.
    • Added &scale=UpscaleCanvas mode. Instead of upscaling the image, the canvas expands to the specified Width and Height.
    • Added DisableImageURLAuthorization setting. Set to TRUE to disable additional URL authorization checking within the resizer (imagecache is still protected).
    • Added support for resizing images served by VirtualPathProviders.
    • Set either ImageResizerUseVirtualPathProvider or ImageResizerUseVirtualPathProviderAsFallback to true to enable the functionality. In Fallback mode, the virtual path provider is only called if no physical file exists.
    • Added support for implementing cache-friendly database-driven image resizing using a VirtualPathProvider.
    • Added IVirtualFileWithModified and IVirtualBitmapFile. Allows custom virtual path providers to be cache-friendly and even send bitmaps directly to the image resizer. Great for implementing new image formats.
    • Added BuildImage overloads with VirtualFile support
    • Added the ability to specify custom extension/ImageFormat mappings, in case your jpegs are named .cow or .pig for some strange reason.
    • Added TranslatePoint methods to allow simulation of a resize (useful for image map generation).
    • Added Size GetFinalSize() methods to ImageManager.cs for determining the resulting size of an image.
    • Performance boost: modified DiskUtil.UpdateCachedVersionIfNeeded to use 'cachedFile' instead of 'sourceFile' as lock/sync key.

    Upgrade proccess

    1. Replace the old files with the new files from the ImageResizer folder. If you are using the .DLL, replace the DLL in the bin folder. Keep your old CustomFolders.cs and WatermarkSettings.cs files if you have modified them.
    2. Delete the /imagecache directory.
    If you are upgrading from 1.2, follow the 1.2->2.0 upgrade instructions first. If you are upgrading from 2.0, follow the 2.0->2.1b upgrade instructions first.

Published on

About Nathanael

Nathanael Jones is a software engineer, father, consultant, and computer linguist with unreasonably high expectations of inanimate objects. He refines .NET, ruby, and javascript libraries full-time at Imazen, but can often be found on stack overflow or participating in W3C community groups.

ImageResizer

If you develop websites, and those websites have images, ImageResizer can make your life much eaiser. Find out more at imageresizing.net.

Imazen

I run Imazen, a tiny software company that specializes in web-based image processing and other difficult engineering problems. I spend most of my time writing image-processing code in C#, web apps in Ruby, and documentation in Markdown. Check out some of my current projects.

More articles