开发者

Android cropper cannot go beyond 256?

开发者 https://www.devze.com 2023-03-31 09:52 出处:网络
I\'m using the android cropper, and when I set the image size above 256, I get the following error: ERROR/JavaBinder(96): !!! FAILED BINDER TRANSACTION !!!

I'm using the android cropper, and when I set the image size above 256, I get the following error:

ERROR/JavaBinder(96): !!! FAILED BINDER TRANSACTION !!!
intent.setData( _captureUri );
    intent.putExtra( "outputX", 512 );
intent.putExtra( "outputY", 512 );
intent.putExtra( "aspectX", 1 );
intent.putExtr开发者_如何学JAVAa( "aspectY", 1 );
intent.putExtra( "scale", true );

Does anyone know of another 3rd party image cropper?

Update!! There is definitely a hardcoded value of 256, how does this affect my cropping?:

http://codesearch.google.com/#cZwlSNS7aEw/packages/apps/Gallery3D/src/com/cooliris/media/CropImage.java&type=cs&l=624


The cropper is part of the Gallery3D app, it's not a public APK. It may or may not be available, and it may break/change at any time. Copy the relevant classes to your project and modify them to suit your needs.

As for the error, the maximum size of data you can transfer with intents is around 1Mb, if you go over this you will get an error. Look at the source, I think it has an option to save the crop result to a Uri, that should get rid of the binder error.

0

精彩评论

暂无评论...
验证码 换一张
取 消