|
@@ -189,11 +189,11 @@ public class PutinPhotosMainActivity extends BaseActivity implements StoJNI.Sca
|
|
|
.openCamera(PictureMimeType.ofImage())
|
|
|
//只需要拍照
|
|
|
//.selectionMode(PictureConfig.SINGLE)
|
|
|
- //.isCamera(true)
|
|
|
+// .isCamera(true)
|
|
|
//.compressMaxKB()//压缩最大值kb compressGrade()为Luban.CUSTOM_GEAR有效
|
|
|
-// .compress(true) // 压缩
|
|
|
-// .cropCompressQuality(100)// 裁剪压缩质量 默认100
|
|
|
-// .minimumCompressSize(100) //最新压缩图片 默认100
|
|
|
+ .compress(true) // 压缩
|
|
|
+ .cropCompressQuality(100)// 裁剪压缩质量 默认100
|
|
|
+ .minimumCompressSize(100) //最新压缩图片 默认100
|
|
|
.forResult(PictureConfig.CHOOSE_REQUEST);
|
|
|
}
|
|
|
|
|
@@ -465,7 +465,12 @@ public class PutinPhotosMainActivity extends BaseActivity implements StoJNI.Sca
|
|
|
//会创建对象和user表
|
|
|
TakePhotosRealm takePhotosRealm = mRealm.createObject(TakePhotosRealm.class,realmId);
|
|
|
//会自动更新表
|
|
|
- takePhotosRealm.setLocalPath(localMedia.getPath());
|
|
|
+ if (localMedia.isCompressed()){
|
|
|
+ takePhotosRealm.setLocalPath(localMedia.getCompressPath());
|
|
|
+ }else{
|
|
|
+ takePhotosRealm.setLocalPath(localMedia.getPath());
|
|
|
+ }
|
|
|
+
|
|
|
takePhotosRealm.setMimeType(localMedia.getMimeType());
|
|
|
takePhotosRealm.setOssUrl("");
|
|
|
takePhotosRealm.setScanDate(scan_date);
|