Skip to content

A custom ImageView that can panning, pinch zoom, double tap zoom,fling and cropping it, e.g: cropping a image to get a avatar

License

Notifications You must be signed in to change notification settings

dengyao/ImageCroppingView

 
 

Repository files navigation

ImageCroppingView

A custom ImageView that can panning, pinch zoom, double tap zoom,fling and cropping it, e.g: cropping a image to get a avatar Sample Image

usage:

1.copy ImageCroppingView.java to your project

2.add a ImageCroppingView to layout file:

<com.github.tcking.imagecroppingview.ImageCroppingView
	android:id="@+id/cropping_view"
	android:layout_width="wrap_content"
	android:layout_height="wrap_content"
	android:src="@drawable/tom_and_jerry" />

3.cropping image:

final ImageCroppingView croppingView = (ImageCroppingView)findViewById(R.id.cropping_view);
Bitmap target=croppingView.getCroppedImage()

ImageCroppingView only help you to cropping a photo,if you want a easy way to get a photo PhotoHelper may help you

About

A custom ImageView that can panning, pinch zoom, double tap zoom,fling and cropping it, e.g: cropping a image to get a avatar

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%