diff --git a/src/ImageProcessorCore/Samplers/Resize.cs b/src/ImageProcessorCore/Samplers/Resize.cs index e2eb5775cb..62d482b917 100644 --- a/src/ImageProcessorCore/Samplers/Resize.cs +++ b/src/ImageProcessorCore/Samplers/Resize.cs @@ -79,6 +79,25 @@ namespace ImageProcessorCore return Resize(source, width, height, new BicubicResampler(), compand, progressHandler); } + /// + /// Resizes an image to the given width and height with the given sampler. + /// + /// The pixel format. + /// The packed format. uint, long, float. + /// The image to resize. + /// The target image width. + /// The target image height. + /// The to perform the resampling. + /// A delegate which is called as progress is made processing the image. + /// The + /// Passing zero for one of height or width will automatically preserve the aspect ratio of the original image + public static Image Resize(this Image source, int width, int height, IResampler sampler, ProgressEventHandler progressHandler = null) + where TColor : IPackedVector + where TPacked : struct + { + return Resize(source, width, height, sampler, false, progressHandler); + } + /// /// Resizes an image to the given width and height with the given sampler. ///