Exemplo n.º 1
0
        public static async Task <FileImageSource> ResizeImage(this FileImageSource imageData, float width, float height)
        {
            await Task.Yield();

            FileStream file = await ResizeImage(imageData.ImageToStream(), width, height);

            return((FileImageSource)FileImageSource.FromFile(file.Name));
        }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="imageData"></param>
        /// <param name="Quality">From 0 to 100</param>
        /// <returns></returns>
        public static async Task <FileImageSource> CompressImage(this FileImageSource imageData, int Quality)
        {
            await Task.Yield();

            FileStream file = await CompressImage(imageData.ImageToStream(), Quality);

            return((FileImageSource)FileImageSource.FromFile(file.Name));
        }