rotation - when i rotate the image to 45 degrees overlay coming out of the bounds in android -


here have quick question on cropping related.

i used library cropping

here snippet code in mainactivity croppersample :

 rotatebutton.setonclicklistener(new view.onclicklistener() {          @override         public void onclick(view v) {             cropimageview.rotateimage(45);         }     }); 

https://github.com/edmodo/cropper

here cropping working perfect don't have questions on cropping.but question when rotate image 45 degrees overlay coming out of image bounds. image shown below.

enter image description here

my requirement overlay should inside , movable corner not coming out of image bounds if image in angle.

i googled , tried many ways no use..

if 1 have idea please me..

thanks in advance..

as per requirement:

overlay should inside , movable corner not coming out of image bounds if image in angle.

you can achieve following steps:

  1. if have used gradle compile 'com.edmodo:cropper:1.0.1' include cropper mean, remove line.
  2. download , import cropper module android studio , add dependency application.
  3. since default color used paint border between overlay , image translucent(#b0000000), change black(#000000). defined in com.edmodo.cropper.util.paintutl.java#default_background_color_id. that's if build , run, desired output below:

cropper-sample.png

note: personal suggestion, faced outofmemoryexception multiple times, library not production ready. please go alternative libraries.


Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -