ImageCropper.Forms.Fix.v2
2.0.9
dotnet add package ImageCropper.Forms.Fix.v2 --version 2.0.9
NuGet\Install-Package ImageCropper.Forms.Fix.v2 -Version 2.0.9
<PackageReference Include="ImageCropper.Forms.Fix.v2" Version="2.0.9" />
paket add ImageCropper.Forms.Fix.v2 --version 2.0.9
#r "nuget: ImageCropper.Forms.Fix.v2, 2.0.9"
// Install ImageCropper.Forms.Fix.v2 as a Cake Addin #addin nuget:?package=ImageCropper.Forms.Fix.v2&version=2.0.9 // Install ImageCropper.Forms.Fix.v2 as a Cake Tool #tool nuget:?package=ImageCropper.Forms.Fix.v2&version=2.0.9
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 is compatible. net8.0-android was computed. net8.0-android34.0 is compatible. net8.0-browser was computed. net8.0-ios was computed. net8.0-ios17.5 is compatible. net8.0-maccatalyst was computed. net8.0-maccatalyst17.5 is compatible. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net8.0-windows10.0.19041 is compatible. |
-
net8.0
- Microsoft.Maui.Controls (>= 8.0.71)
- Microsoft.Maui.Controls.Compatibility (>= 8.0.71)
-
net8.0-android34.0
- Microsoft.Maui.Controls (>= 8.0.71)
- Microsoft.Maui.Controls.Compatibility (>= 8.0.71)
- TR.Maui.Droid.ImageCropper (>= 1.0.1)
-
net8.0-ios17.5
- Microsoft.Maui.Controls (>= 8.0.71)
- Microsoft.Maui.Controls.Compatibility (>= 8.0.71)
- TR.Maui.iOS.TOCropView (>= 1.0.1)
-
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 | 211 | 8/29/2024 |
2.0.8 | 101 | 8/28/2024 |
2.0.7 | 90 | 8/28/2024 |
2.0.6 | 97 | 8/28/2024 |
2.0.5 | 89 | 8/28/2024 |
2.0.4 | 103 | 8/27/2024 |
2.0.3 | 94 | 8/27/2024 |
2.0.2 | 98 | 8/27/2024 |
2.0.1 | 129 | 8/22/2024 |
2.0.0 | 119 | 8/20/2024 |
1.1.11 | 258 | 6/20/2024 |
1.1.10 | 219 | 4/25/2024 |
1.1.9 | 111 | 4/25/2024 |
1.1.8 | 95 | 4/25/2024 |
1.1.7 | 1,585 | 7/18/2023 |
1.1.6 | 3,537 | 11/14/2022 |
1.1.5 | 17,279 | 11/30/2021 |
1.1.4 | 1,082 | 11/29/2021 |
1.1.3 | 1,057 | 11/29/2021 |
1.1.2 | 1,075 | 11/29/2021 |
1.1.1 | 3,197 | 3/17/2021 |
1.1.0 | 741 | 2/19/2021 |
1.0.6 | 523 | 2/6/2021 |
1.0.5 | 2,183 | 6/9/2020 |
1.0.4 | 518 | 6/9/2020 |
1.0.3 | 625 | 5/9/2020 |
1.0.2 | 711 | 4/10/2020 |
1.0.1 | 585 | 4/2/2020 |
1.0.0 | 576 | 4/2/2020 |
0.2.1 | 1,042 | 9/26/2019 |