I have one Bitmap image. I want to crop a region in this bitmap by cocos2d in android? -
i have 1 bitmap image. want crop region in bitmap cocos2d in android? can me? code:
private animation inittvanimation() { animation animation = new animation("abc", 0.2f); (int = 1; < 4; i++) { try { = assetmanager.open(new ccformatter().format("tv00%02d.png", i)); bf=bitmapfactory.decodestream(is); bitmap=bitmap.createbitmap(bf, 0, 0, bf.getwidth(), bf.getheight()); bitmap2=bitmap.createbitmap(bitmap, 140, 195, 743, 380); animation.addframe(bitmap2); } catch (ioexception e) { // todo auto-generated catch block e.printstacktrace(); } } return animation; }
Comments
Post a Comment