Android 图片裁剪 压缩等处理记录

裁剪

uCrop

Android 拍照 选择图片并裁剪

安卓应用图标与名称更新工具

实战图像识别:Compose + MLKit + CameraX

一个简洁的安卓项目参考

RxEasyHttp

EasyHttp

图片与文件上传

图片压缩详解

鲁班压缩

File 图片等转换方法

Android之图片压缩和Uri与String类型的路径转换,获取图片,文件大小的工具类

通过Uri获取到图片地址

java 复制代码
private String getRealPathFromURI(Uri uri) {
    ContentResolver contentResolver = getContentResolver();
    String[] projection = {MediaStore.Images.Media.DATA};
    Cursor cursor = contentResolver.query(uri, projection, null, null, null);
    
    if (cursor != null) {
        int columnIndex = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
        cursor.moveToFirst();
        String imagePath = cursor.getString(columnIndex);
        cursor.close();
        return imagePath;
    }
    return null;
}

Unable to find Gradle tasks to build: [:]. Build mode: ASSEMBLE. Tests: All

相关推荐
阿巴斯甜5 小时前
Android 报错:Zip file '/Users/lyy/develop/repoAndroidLapp/l-app-android-ble/app/bu
android
Kapaseker5 小时前
实战 Compose 中的 IntrinsicSize
android·kotlin
xq95276 小时前
Andorid Google 登录接入文档
android
黄林晴8 小时前
告别 Modifier 地狱,Compose 样式系统要变天了
android·android jetpack
冬奇Lab20 小时前
Android触摸事件分发、手势识别与输入优化实战
android·源码阅读
城东米粉儿1 天前
Android MediaPlayer 笔记
android
Jony_1 天前
Android 启动优化方案
android
阿巴斯甜1 天前
Android studio 报错:Cause: error=86, Bad CPU type in executable
android
张小潇1 天前
AOSP15 Input专题InputReader源码分析
android
_小马快跑_1 天前
Kotlin | 协程调度器选择:何时用CoroutineScope配置,何时用launch指定?
android