/// <summary> /// gets the image from caataas.com/cat and flip it /// </summary> /// <param name="rotationType">multiple manipulation types</param> /// <returns></returns> public async Task <byte[]> RotateCatAsync(int rotationType) { byte[] imageBytes = new byte[] { }; Image image = await _imageLoader.LoadImageAsync(new Uri($"cat", UriKind.Relative)); _imageHandler.RotateAndFlip(image, rotationType); //ImageConverter Class convert Image object to Byte array. imageBytes = (byte[])(new ImageConverter()).ConvertTo(image, typeof(byte[])); return(imageBytes); }