android - How to combine two bitmaps into one so that their relative position should not be changed in rotating the combined one? -
android - How to combine two bitmaps into one so that their relative position should not be changed in rotating the combined one? -
in application,i want combine 2 bitmaps illustration leaf , shadow, in water.i able combine bitmaps , create combined bitmap freely fall top of screen rotation in live wallpaper.in combined image shadow little bit below original leaf , left it.if combined image rotating angle,the shadow rotates angle.it seems shadow rotating original image. shadow position should below original image. times shadow appearing on top of original image while combined image falling rotation because merged.i not want this.i want shadow below original image under instance.how can accomplish this?please help me.i providing code combine 2 bitmaps.
public static bitmap overlay(bitmap bmp1, bitmap bmp2) { bitmap bmoverlay = null; bmoverlay = bitmap.createbitmap(bmp1.getwidth(), bmp1.getheight(), bmp1.getconfig()); canvas canvas = new canvas(bmoverlay); canvas.drawbitmap(bmp1, null, new rect(0, 0, canvas.getwidth() , canvas.getheight()), null); canvas.drawbitmap(bmp2, 20, 20, null); homecoming bmoverlay; }
please suggest me how or other method requirement?thanks in advance.
android bitmap merge image-rotation
Comments
Post a Comment