Пример #1
0
        /// <summary>
        /// Applies the pixel scaler for float32 images.
        /// </summary>
        /// <param name="type">The type of scaler to use.</param>
        /// <param name="width">The width.</param>
        /// <param name="height">The height.</param>
        /// <param name="radius">The radius.</param>
        /// <param name="centeredGrid">if set to <c>true</c> [centered grid].</param>
        /// <param name="filterRegion">The filter region, if any.</param>
        /// <returns>
        /// The rescaled image.
        /// </returns>
        public cImage ApplyScaler(WindowType type, int width, int height, float radius, bool centeredGrid, Rectangle?filterRegion = null)
        {
            var fpImage  = FloatImage.FromImage(this, filterRegion);
            var fpResult = fpImage.Resize(width, height, type, radius, centeredGrid);
            var result   = fpResult.ToImage();

            return(result);
        }