pietjuhhh1990
Well-Known Member
I want an generated bitmap to show in an imageview.
values of vars
cameraWidth = 360
cameraHeight = 480
rgb = int[] for color codes
al vars ar confirmed.
this is the code
I included an image where you can see the value of heigt an width is -1.
How can i fix this?
values of vars
cameraWidth = 360
cameraHeight = 480
rgb = int[] for color codes
al vars ar confirmed.
this is the code
Code:
public void runBitmap(int cameraWidth, int cameraHeight){
Bitmap bmp = Bitmap.createBitmap(rgb, cameraHeight, cameraWidth, Bitmap.Config.RGB_565);
ImageView mBitmapPreview = ((ImageView) findViewById(R.id.imageView1));
try {
mBitmapPreview.setImageBitmap(bmp);
} catch (Exception e){
e.printStackTrace();
}
}
How can i fix this?