Пример #1
0
 /// <inheritdoc />
 public IPixelData Rescale(double scale)
 {
     if (scale == 1.0) return this;
     var w = (int)(Width * scale);
     var h = (int)(Height * scale);
     var data = BilinearInterpolation.RescaleColor24(Data, Width, Height, w, h);
     return new ColorPixelData24(w, h, data);
 }
Пример #2
0
        public IPixelData Rescale(double scale)
        {
            int w = (int)(Width * scale);
            int h = (int)(Height * scale);

            byte[] data = BilinearInterpolation.RescaleColor24(_data, Width, Height, w, h);
            return(new ColorPixelData24(w, h, data));
        }
Пример #3
0
        /// <inheritdoc />
        public IPixelData Rescale(double scale)
        {
            var w = (int)(Width * scale);
            var h = (int)(Height * scale);

            if (w == Width && h == Height)
            {
                return(this);
            }

            var data = BilinearInterpolation.RescaleColor24(Data, Width, Height, w, h);

            return(new ColorPixelData24(w, h, data));
        }