@ -22,7 +22,7 @@ namespace ImageProcessorCore
/// <returns>The <see cref="Image{T}"/></returns>
/// <remarks>Passing zero for one of height or width within the resize options will automatically preserve the aspect ratio of the original image</remarks>
public static Image < T , TP > Resize < T , TP > ( this Image < T , TP > source , ResizeOptions options , ProgressEventHandler progressHandler = null )
where T : IPackedVector < T , T P> , new ( )
where T : IPackedVector < TP > , new ( )
where TP : struct
{
// Ensure size is populated across both dimensions.
@ -52,7 +52,7 @@ namespace ImageProcessorCore
/// <returns>The <see cref="Image{T}"/></returns>
/// <remarks>Passing zero for one of height or width will automatically preserve the aspect ratio of the original image</remarks>
public static Image < T , TP > Resize < T , TP > ( this Image < T , TP > source , int width , int height , ProgressEventHandler progressHandler = null )
where T : IPackedVector < T , T P> , new ( )
where T : IPackedVector < TP > , new ( )
where TP : struct
{
return Resize ( source , width , height , new BicubicResampler ( ) , false , progressHandler ) ;
@ -70,7 +70,7 @@ namespace ImageProcessorCore
/// <returns>The <see cref="Image{T}"/></returns>
/// <remarks>Passing zero for one of height or width will automatically preserve the aspect ratio of the original image</remarks>
public static Image < T , TP > Resize < T , TP > ( this Image < T , TP > source , int width , int height , bool compand , ProgressEventHandler progressHandler = null )
where T : IPackedVector < T , T P> , new ( )
where T : IPackedVector < TP > , new ( )
where TP : struct
{
return Resize ( source , width , height , new BicubicResampler ( ) , compand , progressHandler ) ;
@ -89,7 +89,7 @@ namespace ImageProcessorCore
/// <returns>The <see cref="Image{T}"/></returns>
/// <remarks>Passing zero for one of height or width will automatically preserve the aspect ratio of the original image</remarks>
public static Image < T , TP > Resize < T , TP > ( this Image < T , TP > source , int width , int height , IResampler sampler , bool compand , ProgressEventHandler progressHandler = null )
where T : IPackedVector < T , T P> , new ( )
where T : IPackedVector < TP > , new ( )
where TP : struct
{
return Resize ( source , width , height , sampler , source . Bounds , new Rectangle ( 0 , 0 , width , height ) , compand , progressHandler ) ;
@ -115,7 +115,7 @@ namespace ImageProcessorCore
/// <returns>The <see cref="Image{T}"/></returns>
/// <remarks>Passing zero for one of height or width will automatically preserve the aspect ratio of the original image</remarks>
public static Image < T , TP > Resize < T , TP > ( this Image < T , TP > source , int width , int height , IResampler sampler , Rectangle sourceRectangle , Rectangle targetRectangle , bool compand = false , ProgressEventHandler progressHandler = null )
where T : IPackedVector < T , T P> , new ( )
where T : IPackedVector < TP > , new ( )
where TP : struct
{
if ( width = = 0 & & height > 0 )