Так что я пытаюсь сократить масштабы растрового изображения на основе размера вида поверхности я написал следующий кодAndroid сворачивают Картинку, основанную на SurfaceView
public Bitmap scaleBitMap(int width, int height, Bitmap b){
// scale down based on the size of the Surface view.
// width and height = canvas.getHeight(), canvas.getWidth();
// this should set the height and width of the bitmap based on a percentage
// the bit map is returned and then displayed by canvas.drawBitmap(scaleBitMap(canvas.getHeight(),canvas.getWidth(),bitmapHere)....
Bitmap bitmap = null;
try{
bitmap = Bitmap.createScaledBitmap(b, (height/100 * 10), (width/100 * 10), true);
}catch(Exception e){
}
return bitmap;
}
Ok так что этот код работает! возвращает масштабированное растровое изображение.
вместо canvas.drawBitmap (scaleBitMap, ... называйте canvas.drawBitmap (б, матрица, краска) – pskink
pskink, да что вероятно, будет работать, но для простоты из приложения ... не то, что я искал спасибо. – NathanEvans