Resizer 3.4.0 - October 17 2013

Download source, binaries, plugins, and sample code (15MB) or Download core binary only (170K)

New plugins

New guidance

  • Use the Instructions class instead of ResizeSettings whenever possible. ResizeSettings will eventually be removed.
  • If you use any plugins with native dependencies, call ImageResizer.Configuration.Config.Current.Plugins.LoadPlugins() during Application_Start.
  • Don't work directly with Bitmap instances. Methods that return a Bitmap instance are now marked obsolete due to the high probability of memory leaks and encoding bugs in user code.
  • Unit tests now require .NET 4.5 to run. The core library and most plugins can still be compilied under Visual Studio 2010 or higher. Run PM> Update-Package -Reinstall if your nuget packages aren't automatically restored.
  • Does your plugin need to pass additional information back to the ImageJob? Use ImageJob.ResultInfo.
  • If you have more than 2 cores, consider using an IIS Web Garden or our WIC pipeline to get optimal throughput.

Bug fixes in core

  • Fixed: Combining manual cropping and sourcerotation (crop=0,10,30,30&srotate=90) causes distorion. Bug introduced in 3.3.2 with CMYK fix. (#51)
  • Fixed: DefaultSettings plugin doesn't work with w/h abbreviation (#45)
  • Fixed: Improved I/O predictability through explicit Flush calls for all I/O operations. (Breaking change in .NET 4 - closing a FileStream does not always flush it).
  • Fixed: Instructions.CropRectangle is now spelled correctly. Mispelling will also remain functional until the next major release.

Known remaining bugs

  • AzureReader2 and 404plugin are incompatible
  • When using auto-cropping (mode=crop), scale=down may sometimes be ignored, acting as if scale=both was set.
  • .NET 4 introduces a FileStream.Flush(true) method to restore the flush-to-disk guarantee. When we move to .NET 4 in the next major release, we will use it.
  • Recent windows updates have reduced the performance of System.Drawing, preventing more than one resize operation at a time per process. You can work around this by using the IIS Web Garden feature, or by switching to the WIC pipeline.

Improvements to core

  • You can now access SourceWidth and SourceHeight after running an ImageJob, as well as the ResultFileExtension and ResultMimeType. Only the default pipeline populates this data for now - WIC and FreeImage support comes later.
  • You can now read the size of an image without resizing it, using ImageBuilder.LoadImageInfo(object source, string[] requestedInfo).
  • An ImageJob can return information instead of a result image now. Added new ImageJob(source, requestedInfo), ImageJob.RequestedInfo, and ImageJob.ResultInfo.
  • Introduced IFileSignatureProvider and added default implementation to DefaultEncoder. This allows plugins to provide unified file type detection data.
  • The diagnostics page now warns you if precompilation is detected (it breaks data source plugins).
  • Dangerous ImageBuilder methods (such as LoadImage and Build(bitmap,settings)) are now marked as obsolete (see guidance section above)

Changes to DiskCache plugin

  • Fixed rare 500 bug in DiskCache (serving file that is partially flushed to disk). More likely to occur when file system write caching is disabled.
  • Fixed: Diskcache blocked any url including the segment /imagecache/, instead of just the root instance. Note that if you have sub-applications, those /imagecache/ folders will be exposed if DiskCache is not installed.

Changes to SqlReader

  • Added support for stored procedures to SqlReader: via QueriesAreStoredProcedures setting.

Changes to AzureReader2

  • Fixed bug with blob redirection when the application is hosted in a virtual folder instead of at the domain root. (Fixes #49)
  • Fixed bug causing 400 errors with newer version of Azure library (thanks to Martin Larsen)

Changes to MongoReader

  • Updated MongoReader to 1.8 (Thanks @jakenuts!)
  • Updated Newtonsoft.Json

Changes to Watermark

  • Watermark now throws a 500 error instead of a 404 if a watermark image can't be found. (#23)

Changes to RemoteReader

  • Fixed bug in RemoteReader - extension correction was still failing to work (causing PNG images to be rencoded as jpegs when no format was explicitly specified).

All releases