Beispiel #1
0
        public static Image GetThumbnailOfMaxSize(Image _image, int _maxDimension)
        {
            SizeF sizeF = ImageSizeHelper.SizeThatFits(_image, _maxDimension);
            Size  size  = sizeF.ToSize();

            return(GetThumbnail(_image, size.Height, size.Width));
        }
Beispiel #2
0
        public static byte[] GetThumbnailBytesOfMaxSize(Image _image, int _maxDimension)
        {
            SizeF sizeF = ImageSizeHelper.SizeThatFits(_image, _maxDimension);
            Size  size  = sizeF.ToSize();

            Image image = GetThumbnail(_image, size.Height, size.Width);

            return(GetBytes(image, ImageFormat.Jpeg));
        }