这是indexloc提供的服务,不要输入任何密码

face_cropper 0.0.4 copy "face_cropper: ^0.0.4" to clipboard
face_cropper: ^0.0.4 copied to clipboard

A flutter package that detects face in an image and gives cropped image of face.

Face Cropper #

A flutter package that detects face in an image and gives cropped image of face.

Preview #

face_cropper_2024-02-21

Installation #

First, add face_cropper as a dependency in your pubspec.yaml file.

face_cropper: ^<latest-version>

iOS #

• Minimum iOS Deployment Target: 13.0

Add a row to the ios/Runner/Info.plist:

• Add Privacy - Photo Library Usage Description and a usage description.

• If editing Info.plist as text, add:

<key>NSPhotoLibraryUsageDescription</key>
<string>your usage description here</string>

Android #

• Change the minimum Android sdk version to 21 (or higher) in your android/app/build.gradle file.

minSdkVersion 21

Usage #

• Add the import of the dependency

import 'package:face_cropper/face_cropper.dart';

• Create an instance of the FaceCropper class

FaceCropper faceCropper = FaceCropper();

• Use the async detectFacesAndCrop method to get a cropped image path

await faceCropper.detectFacesAndCrop(<path_to_image>);

• It returns a path of the cropped image

Contributions #

Contributions of any kind are more than welcome! Feel free to fork and improve face_cropper in any way you want, make a pull request, or open an issue.

Support the Library #

You can support the library by liking it on pub, staring in on Github and reporting any bugs you encounter

10
likes
140
points
50
downloads

Publisher

unverified uploader

Weekly Downloads

A flutter package that detects face in an image and gives cropped image of face.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, google_mlkit_face_detection, image, logger, path_provider

More

Packages that depend on face_cropper