ImageCropper.Forms.Fix.v2
2.0.7
See the version list below for details.
dotnet add package ImageCropper.Forms.Fix.v2 --version 2.0.7
NuGet\Install-Package ImageCropper.Forms.Fix.v2 -Version 2.0.7
<PackageReference Include="ImageCropper.Forms.Fix.v2" Version="2.0.7" />
<PackageVersion Include="ImageCropper.Forms.Fix.v2" Version="2.0.7" />
<PackageReference Include="ImageCropper.Forms.Fix.v2" />
paket add ImageCropper.Forms.Fix.v2 --version 2.0.7
#r "nuget: ImageCropper.Forms.Fix.v2, 2.0.7"
#addin nuget:?package=ImageCropper.Forms.Fix.v2&version=2.0.7
#tool nuget:?package=ImageCropper.Forms.Fix.v2&version=2.0.7
ImageCropper.Forms
.NET MAUI plugin to crop and rotate photos.
Supports Android and iOS.
- Android library from : https://github.com/ArthurHub/Android-Image-Cropper migrar a https://github.com/CanHub/Android-Image-Cropper
- iOS library from : https://github.com/TimOliver/TOCropViewController
Features
- Cropping image.
- Rotating image.
- Aspect ratio.
- Circle/Rectangle shape.
Screen-Shots
Android
<img src="ScreenShots/Android_Rectangle.gif" alt="Crop/Rotate image(Rectangle/Android)"/> <img src="ScreenShots/Android_Circle.gif" alt="Crop/Rotate image(Circle/Android)"/>
iOS
<img src="ScreenShots/iOS_Rectangle.gif" alt="Crop/Rotate image(Rectangle/iOS)"/> <img src="ScreenShots/iOS_Circle.gif" alt="Crop/Rotate image(Circle/iOS)" />
Setup
- Install the nuget package in portable and all platform specific projects.
- This plugin uses the MediaPlugin. Be sure to complete the full setup this plugin. Please fully read through the MediaPlugin description.
Android
Add the following to your AndroidManifest.xml inside the <application> tags:
<activity android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
android:theme="@style/Base.Theme.AppCompat"/>
In MainActivity.cs file:
Stormlion.ImageCropper.Droid.Platform.Init();
global::Xamarin.Forms.Forms.Init(this, bundle);
protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
{
base.OnActivityResult(requestCode, resultCode, data);
Stormlion.ImageCropper.Droid.Platform.OnActivityResult(requestCode, resultCode, data);
}
iOS
In AppDelegate.cs file:
Stormlion.ImageCropper.iOS.Platform.Init();
Usage
Show ImageCropper page.
new ImageCropper()
{
Success = (imageFile) =>
{
Device.BeginInvokeOnMainThread(() =>
{
imageView.Source = ImageSource.FromFile(imageFile);
});
}
}.Show(this);
Show it with additional parameters.
new ImageCropper()
{
PageTitle = "Test Title",
AspectRatioX = 1,
AspectRatioY = 1,
CropShape = ImageCropper.CropShapeType.Oval,
SelectSourceTitle = "Select source",
TakePhotoTitle = "Take Photo",
PhotoLibraryTitle = "Photo Library",
CancelButtonTitle = "Cancel",
Success = (imageFile) =>
{
Device.BeginInvokeOnMainThread(() =>
{
imageView.Source = ImageSource.FromFile(imageFile);
});
}
}.Show(this);
Show it with a image
new ImageCropper()
{
Success = (imageFile) =>
{
Device.BeginInvokeOnMainThread(() =>
{
imageView.Source = ImageSource.FromFile(imageFile);
});
}
}.Show(this, imageFileName);
Properties
- PageTitle
- AspectRatioX
- AspectRatioY
- CropShape
- Initial image can be set in Show function.
Contributions
Contributions are welcome!
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0-android34.0 is compatible. net8.0-ios17.5 is compatible. net8.0-maccatalyst17.5 is compatible. net8.0-windows10.0.19041 is compatible. net9.0-android was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-windows was computed. |
-
net8.0-android34.0
- Microsoft.Maui.Controls (>= 8.0.71)
- Microsoft.Maui.Controls.Compatibility (>= 8.0.71)
- TR.Maui.Droid.ImageCropper (>= 1.0.0)
-
net8.0-ios17.5
- Microsoft.Maui.Controls (>= 8.0.71)
- Microsoft.Maui.Controls.Compatibility (>= 8.0.71)
- TR.Maui.iOS.TOCropView (>= 1.0.0)
-
net8.0-maccatalyst17.5
- Microsoft.Maui.Controls (>= 8.0.71)
- Microsoft.Maui.Controls.Compatibility (>= 8.0.71)
-
net8.0-windows10.0.19041
- Microsoft.Maui.Controls (>= 8.0.71)
- Microsoft.Maui.Controls.Compatibility (>= 8.0.71)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.0.9 | 314 | 8/29/2024 |
2.0.8 | 114 | 8/28/2024 |
2.0.7 | 102 | 8/28/2024 |
2.0.6 | 111 | 8/28/2024 |
2.0.5 | 104 | 8/28/2024 |
2.0.4 | 117 | 8/27/2024 |
2.0.3 | 106 | 8/27/2024 |
2.0.2 | 110 | 8/27/2024 |
2.0.1 | 141 | 8/22/2024 |
2.0.0 | 133 | 8/20/2024 |
1.1.11 | 294 | 6/20/2024 |
1.1.10 | 249 | 4/25/2024 |
1.1.9 | 122 | 4/25/2024 |
1.1.8 | 108 | 4/25/2024 |
1.1.7 | 1,690 | 7/18/2023 |
1.1.6 | 3,675 | 11/14/2022 |
1.1.5 | 17,490 | 11/30/2021 |
1.1.4 | 1,111 | 11/29/2021 |
1.1.3 | 1,087 | 11/29/2021 |
1.1.2 | 1,106 | 11/29/2021 |
1.1.1 | 3,241 | 3/17/2021 |
1.1.0 | 780 | 2/19/2021 |
1.0.6 | 560 | 2/6/2021 |
1.0.5 | 2,220 | 6/9/2020 |
1.0.4 | 554 | 6/9/2020 |
1.0.3 | 665 | 5/9/2020 |
1.0.2 | 750 | 4/10/2020 |
1.0.1 | 623 | 4/2/2020 |
1.0.0 | 614 | 4/2/2020 |
0.2.1 | 1,086 | 9/26/2019 |