コード例 #1
0
        public virtual void Reisze(Size newSize, InterpolationMode interp, GraphicsUnit units)
        {
            if (this.Image == null)
            {
                return;
            }

            UpdateImage(ImageProcessor.ResizeImage(this.Image, newSize, interp, units));
        }
コード例 #2
0
        public virtual void Reisze(Size newSize, GraphicsUnit units)
        {
            if (this.Image == null)
            {
                return;
            }

            if ((newSize.Width + newSize.Height) >> 1 > (this.Image.Width + this.Image.Height) >> 1)
            {
                UpdateImage(ImageProcessor.ResizeImage(this.Image, newSize, InterpolationMode.NearestNeighbor, units));
            }
            else
            {
                UpdateImage(ImageProcessor.ResizeImage(this.Image, newSize, InterpolationMode.HighQualityBicubic, units));
            }
        }