The documentation for ResizeSettings says: "Replaced by the" Instructions "class http://documentation.imageresizing.net/docu/ImageResizer/ResizeSettings.htm
The documentation for the instructions says: "Successor to ResizeSettings." http://documentation.imageresizing.net/docu/ImageResizer/Instructions.htm
However, I cannot figure out how to use instructions instead of ResizeSettings. I tried
- Google
- Documentation (documentation.imageresizing.net)
- View Object Browser for instructions
- Search ImageResizer.dll in .net Reflector for instructions
- Decompiling the entire ImageResizer.dll file and searching through the resulting code.
If the commands replace ResizeSettings, then how can I use it instead of ResizeSettings?
=== Edit - more details:
This way to use ResizeSettings:
public static Bitmap Resize(Bitmap bitmap, int maxHeight, int maxWidth) { var setting = new ResizeSettings { MaxHeight = maxHeight, MaxWidth = maxWidth, }; return ImageBuilder.Current.Build(bitmap, setting); }
Reading this Instruction was a replacement for ResizeSettings, one of the first things I tried was this: (I was hoping ImageBuilder might have an overloaded Build method)
public static Bitmap Resize(Bitmap bitmap, int maxHeight, int maxWidth) { var instructions = new Instructions { Width = maxWidth, Height = maxHeight, Mode = FitMode.Max }; return ImageBuilder.Current.Build(bitmap, instructions); }
source share