直播app开发搭建,Android studio 图片压缩 获取图片目录 File file=Environment.getExternalStorageDirectory();//获取根路径 storage/emulated/0 String path1=file.getPath()+"/Pictures/1655215651628.jpg";//Pictures文件夹下面的 1655215651628.jpg图片名 例 //path 压缩图片的路径 String path="/storage/emulated/0/Pictures/1655215651628.jpg"; Bitmap bitmap = obtainImageFromPath(path, 100, 160); saveBitmapFile(bitmap);//把压缩图片储存 image.setImageBitmap(bitmap); //传入路径和宽高 public static Bitmap obtainImageFromPath(String path, int width, int height) {...
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Get in touch with saveBitmap
Contact saveBitmap, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack