Skip to content

camptured image is show low quality #36

@aviontechnology

Description

@aviontechnology

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions