Code example for ByteArrayOutputStream

Methods: sizetoByteArray

	 * @param compression The compression ratio 0-100. 
	 * @return The compressed bitmap. 
	public static Bitmap compress(Bitmap bm, int compression)
		ByteArrayOutputStream bitmapOutputStream = new ByteArrayOutputStream();
		bm.compress(CompressFormat.JPEG, compression, bitmapOutputStream);
		if (mRecycleBitmaps)
		return BitmapFactory.decodeByteArray(bitmapOutputStream.toByteArray(), 0, bitmapOutputStream.size());		
	 * Rotates a bitmap. Original bitmap is recycled after this method is called. 
	 * @param bm The bitmap to rotate 
	 * @param degrees The degrees to rotate at. 0-360 clockwise. 
Connect your IDE to all the code out there  Get Codota for Java