2017-04-24 49 views
0

我有一個圖像查看傳呼機,它將選擇一個圖像。但我想用zoomIn和ZoomOut函數在圖像中裁剪此圖像。如何才能做到這一點?如何裁剪從android資源文件夾(@mipmap)獲取的圖像?

mImageCaptureUri=Uri.parse("android.resource://app.islamic.unikacomp.myapplication/" +sliderImagesId[num]); 
// Retrieve a WallpaperManager 
WallpaperManager myWallpaperManager = WallpaperManager.getInstance(Animalwallpaper.this);   
try { 
// Change the current system wallpaper 
myWallpaperManager.setResource(sliderImagesId[num]); 
// Show a toast message on successful change 
Toast.makeText(Animalwallpaper.this,"Wallpaper successfully changed", Toast.LENGTH_SHORT).show(); 

} catch (IOException e) { 
// TODO Auto-generated catch block 
} 
+0

告訴我們到目前爲止你做了什麼?所以我們可以建議你一些方法來實現你的目標 – Bhavnik

+0

我認爲你可以搜索和使用一些圖像裁剪庫和捏住從github的joom功能。 –

+0

我搜索。但找不到 – suman

回答

0

您可以在Github上 這裏找到多個庫是few-

Android Image Cropper

Croper

+0

我會嘗試並回復 – suman

+0

其作品。謝謝 – suman

+0

如果答案的作品,然後請接受它 –