Пример #1
0
        public static ImageSource ResizeImage(string imageName)
        {
            var imageByte = imageResizerHelpers.ResizeImage(
                App.Configuration.ImageSizes.FirstOrDefault(s => s.ImageID == imageName));

            return(ImageSource.FromStream(() => new MemoryStream(imageByte)));
        }
Пример #2
0
        static byte[] Default(byte[] imageByte, ImageSize imageSize)
        {
            if (imageByte == null)
            {
                imageSize.ImageName = "no.png";
                imageByte           = ImageResizerHelpers.ResizeImage(imageSize);
            }

            return(imageByte);
        }