-
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Question / Discussion
I'm trying to translate this C# code for use with Fabulous.XamarinForms.FFImageLoading:
var t = ImageService.Instance.LoadStream(async c => await image.OpenReadAsync()); // image is a Xamarin.Essentials.FileResult.
t.Transform(new RotateTransformation(90));
using var imageStream = await t.AsPNGStreamAsync();
I've gotten this far in F#:
let t = FFImageLoading.ImageService.Instance.LoadStream(fun _ -> image.OpenReadAsync())
t.Transform(FFImageLoading.Transformations.RotateTransformation(90.)) |> ignore
use! imageStream = t.AsPNGStreamAsync() |> Async.AwaitTask
But in my F# code the AsPNGStreamAsync
extension method cannot be found.
I also don't understand why open Fabulous.XamarinForms.FFImageLoading
or open FFImageLoading
both don't seem to work and I need to use use FFImageLoading.ImageService ...
and FFImageLoading.Transformations ...
instead. But I suspect this may have something to do with my problem.
Can anyone tell me what I'm doing wrong?
Metadata
Metadata
Assignees
Labels
No labels