ImageGlass.ImageBox.GetInterpolationMode C# (CSharp) Method

GetInterpolationMode() protected method

Determines a suitable interpolation mode based in the value of the InterpolationMode and Zoom properties.
protected GetInterpolationMode ( ) : InterpolationMode
return InterpolationMode
        protected virtual InterpolationMode GetInterpolationMode()
        {
            InterpolationMode mode;

            mode = InterpolationMode;

            if (mode == InterpolationMode.Default)
            {
                // ReSharper disable once ConvertIfStatementToConditionalTernaryExpression
                if (Zoom < 100)
                {
                    // TODO: Check to see if we should cherry pick other modes depending on how much the image is actually zoomed
                    mode = InterpolationMode.HighQualityBicubic;
                }
                else
                {
                    mode = InterpolationMode.NearestNeighbor;
                }
            }

            return mode;
        }
ImageBox