Code example for Bitmap

Methods: eraseColorgetHeightgetPixelsgetWidth

0
	@TargetApi(11) 
	public void makeOverlay() { 
		overlayimage = (ImageView) findViewById(R.id.colormap_overlay);
		setBmp(); 
 
		int height = bmp.getHeight();
		int width = bmp.getWidth();
 
		convx = 1.0 * width / mapx;
		convy = 1.0 * height / mapy;
 
		offset(); 
 
	} 
 
	@SuppressLint("NewApi") 
	public void resetBmp() { 
		bmp = BitmapFactory.decodeResource(getResources(),
				R.drawable.overlayimg); 
		bmp.eraseColor(0);
		Log.d("main", "IIIIII reset ");
		overlayimage.setImageBitmap(bmp);
		overlayimage.setAlpha((float) .6);
	} 
 
Contextual code suggestions in your IDE  Get Codota for Java