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                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ImageCropper.Forms.Fix.v2" Version="2.0.9" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ImageCropper.Forms.Fix.v2 --version 2.0.9                
#r "nuget: ImageCropper.Forms.Fix.v2, 2.0.9"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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.

NuGet

Supports Android and iOS.

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

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 202 8/29/2024
2.0.8 100 8/28/2024
2.0.7 89 8/28/2024
2.0.6 96 8/28/2024
2.0.5 88 8/28/2024
2.0.4 102 8/27/2024
2.0.3 93 8/27/2024
2.0.2 97 8/27/2024
2.0.1 128 8/22/2024
2.0.0 118 8/20/2024
1.1.11 233 6/20/2024
1.1.10 218 4/25/2024
1.1.9 110 4/25/2024
1.1.8 92 4/25/2024
1.1.7 1,575 7/18/2023
1.1.6 3,501 11/14/2022
1.1.5 17,238 11/30/2021
1.1.4 1,079 11/29/2021
1.1.3 1,056 11/29/2021
1.1.2 1,074 11/29/2021
1.1.1 3,194 3/17/2021
1.1.0 740 2/19/2021
1.0.6 522 2/6/2021
1.0.5 2,181 6/9/2020
1.0.4 517 6/9/2020
1.0.3 622 5/9/2020
1.0.2 710 4/10/2020
1.0.1 584 4/2/2020
1.0.0 575 4/2/2020
0.2.1 1,040 9/26/2019