CameraFilter icon indicating copy to clipboard operation
CameraFilter copied to clipboard

camptured image is show low quality

Open aviontechnology opened this issue 7 years ago • 0 comments

Hello, thank you in advance,

i use this library to take camera image but image quality is not that much good. i use below capture code

private boolean caputre() {

	String mPath = genSaveFileName(getTitle().toString() + "_", ".png");
	File imageFile = new File(mPath);
	if (imageFile.exists()) {
		imageFile.delete();
	}

	//sessionManager.setStringData(SessionManager.KEY_picturepath);
	sessionManager.putStringData(SessionManager.KEY_picturepath,mPath);

	// create bitmap screen capture
	Bitmap bitmap = textureView.getBitmap();
	//Bitmap bitmap = textureView.getDrawingCache();

	OutputStream outputStream = null;

	try {
		outputStream = new FileOutputStream(imageFile);
	//	bitmap.compress(Bitmap.CompressFormat.PNG, 100, outputStream);
		bitmap.compress(Bitmap.CompressFormat.PNG, 100, outputStream);

		outputStream.flush();
		outputStream.close();

	} catch (FileNotFoundException e) {
		e.printStackTrace();
		return false;
	} catch (IOException e) {
		e.printStackTrace();
		return false;
	}

	return true;
}

please give some solution to improve quality

aviontechnology avatar Mar 15 '18 11:03 aviontechnology