private static InputStream compressQuality(Bitmap image,int maxSize) {
		ByteArrayInputStream bais=null;
		try {
			ByteArrayOutputStream baos = new ByteArrayOutputStream();
			image.compress(Bitmap.CompressFormat.JPEG, 100,baos);
			int quality=100;
			while(baos.toByteArray().length /1024 >maxSize) {
				quality-=10;
				baos.reset();
				image.compress(Bitmap.CompressFormat.JPEG, quality, baos);
			}
			 bais= new ByteArrayInputStream(baos.toByteArray());
		}catch(Exception e) {
			e.printStackTrace();
		}
		
		return bais;
	}