2011-04-01から1ヶ月間の記事一覧

Xperia arcのカメラで撮ったデータをBitmapクラスで扱えるバイトデータに変換する

public class Image { /** * @param tempData * @param width * @param height * @return * @throws NullPointerException * @throws IllegalArgumentException */ public static int[] decodeYUV(byte[] tempData, int width, int height) throws NullPoint…

Canvasの外側を丸く塗る

/** * @param canvas */ private void setBlackEdge(Canvas canvas) { float w = canvas.getWidth(); float h = canvas.getHeight(); int[] colors = new int[] { 0x00000000, 0x00000000, 0xFF000000 }; RectF rect = new RectF(0, 0, w, h); // create a p…