Android 如何将ImageView剪切为四个指定点范围内的子图像
我知道我们可以通过使用系统操作“com.android.camera.action.CROP”来编辑图像视图 但有时我想自己剪切图像,比如: imageView A的位图为300dip*300dip 子图像应该是四点左上(0,0)、左下(0100)、右下(100100)、右上(100,0)的范围Android 如何将ImageView剪切为四个指定点范围内的子图像,android,android-widget,Android,Android Widget,我知道我们可以通过使用系统操作“com.android.camera.action.CROP”来编辑图像视图 但有时我想自己剪切图像,比如: imageView A的位图为300dip*300dip 子图像应该是四点左上(0,0)、左下(0100)、右下(100100)、右上(100,0)的范围 如何创建子图像(位图)?使用此静态方法: Bitmap cropedBitmap = Bitmap.createBitmap(source, x, y, width, height); 源-原始位图
如何创建子图像(位图)?使用此静态方法:
Bitmap cropedBitmap = Bitmap.createBitmap(source, x, y, width, height);
源-原始位图
x—源中第一个像素的x坐标
y—源中第一个像素的y坐标