RestImageResize/ImageTransformationBuilder.cs
/// <summary>
/// Prepares the transformation size before transformation performing.
/// </summary>
/// <param name="image">The target image.</param>
Prepares the transformation size before transformation performing.
Prepares the transformation size before transformation performing .
protected virtual void PrepareSize(IImage image)
        {
            bool ignoreMissedDimension = (TransformType == ImageTransform.Fit || TransformType == ImageTransform.DownFit);
            if (TransformType == ImageTransform.ResizeMin || TransformType == ImageTransform.DownResizeMin)
            {
                if (Width == 0)
                {
                    Width = Height;
                }
                if (Height == 0)
                {
                    Height = Width;
                }
            }
            if (Width == 0)
            {
                Width = ignoreMissedDimension ? int.MaxValue : image.Width;
            }
            if (Height == 0)
            {
                Height = ignoreMissedDimension ? int.MaxValue : image.Height;
            }
        }
protected virtual void PrepareSize ( IImage image ) { bool ignoreMissedDimension = ( TransformType == ImageTransform . Fit || TransformType == ImageTransform . DownFit ) ; if ( TransformType == ImageTransform . ResizeMin || TransformType == ImageTransform . DownResizeMin ) { if ( Width == 0 ) { Width = Height ; } if ( Height == 0 ) { Height = Width ; } } if ( Width == 0 ) { Width = ignoreMissedDimension ? int . MaxValue : image . Width ; } if ( Height == 0 ) { Height = ignoreMissedDimension ? int . MaxValue : image . Height ; } }
Prepares the transformation size before transformation performing.
Prepares the transformation size before transformation performing .
image
IImage
The target image.
The target image .