Closed bvschie closed 7 years ago
I use CropTransformation in the way demonstrated in the project for Xamarin.Forms.
Transformations = new List<ITransformation>() { new CropTransformation(CurrentZoomFactor, CurrentXOffset, CurrentYOffset) };
The XAML looks like this;
<ScrollView> <StackLayout> <ffimageloading:CachedImage x:Name="PhotoViewer" HorizontalOptions="Fill" VerticalOptions="Fill" Source="{Binding ImageUrl}" Transformations="{Binding Transformations}" CacheType="Disk"> <ffimageloading:CachedImage.GestureRecognizers> <PinchGestureRecognizer PinchUpdated="OnPinchUpdated" /> <PanGestureRecognizer PanUpdated="OnPanUpdated" /> </ffimageloading:CachedImage.GestureRecognizers> </ffimageloading:CachedImage> </StackLayout> </ScrollView>
As soon i apply a CropTransformation to a non-square image; the result is a squared image; Is this a Bug or do I use the Transformation or XAML wrongly ?
Thank you, Bob.
It's not a bug, CropTransformation has aspect ratio properties for controlling that:
CropTransformation
aspect ratio
https://github.com/luberda-molinet/FFImageLoading/blob/master/source/FFImageLoading.Transformations/CropTransformation.cs#L31-L32
I use CropTransformation in the way demonstrated in the project for Xamarin.Forms.
The XAML looks like this;
As soon i apply a CropTransformation to a non-square image; the result is a squared image; Is this a Bug or do I use the Transformation or XAML wrongly ?
Thank you, Bob.