Code example for Bitmap

Methods: copygetHeightgetPixelgetWidth

0
		); 
		mIndirectObject.addStreamContent(mProcessedImage);
	} 
	 
	private Bitmap configureBitmap(Bitmap bitmap) {
		final Bitmap img = bitmap.copy(Config.ARGB_8888, false);
		if (img != null) {
			mWidth = img.getWidth();
			mHeight = img.getHeight();
			mDataSize = mWidth * mHeight * 3;
		} 
		return img;
	} 
	 
	private byte[] getBitmapData(Bitmap bitmap) {
		byte[] data = null;
		if (bitmap != null) {
			data = new byte[mDataSize];
			int intColor;
			int offset = 0;
			for (int y = 0; y < mHeight; y++) {
				for (int x = 0; x < mWidth; x++) {
					intColor = bitmap.getPixel(x, y);
					data[offset++] = (byte) ((intColor>>16) & 0xFF); 
					data[offset++] = (byte) ((intColor>>8) & 0xFF); 
					data[offset++] = (byte) ((intColor>>0) & 0xFF); 
				} 
			}