You can do this by superimposing two images. Suppose bmp1 is larger (for protection) and bmp2 is a marker:
private Bitmap overlayMark(Bitmap bmp1, Bitmap bmp2) { Bitmap bmOverlay = Bitmap.createBitmap(bmp1.getWidth(), bmp1.getHeight(), bmp1.getConfig()); Canvas canvas = new Canvas(bmOverlay); canvas.drawBitmap(bmp1, 0, 0, null); canvas.drawBitmap(bmp2, distanceLeft, distanceTop, null); return bmOverlay; }
distanceLeft and distanceTop determine the position of the marker.
source share