We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi all, I need the filtered image as Bitmap object at the end. How can I do that?
The text was updated successfully, but these errors were encountered:
Hi gkakasevski, You can use code below:
BitmapOutput output;
public void getBitmap(){ GaussianBlurFilter gauu = new GaussianBlurFilter(2.0f); gauu.addTarget(screen); pipeline.pauseRendering(); input.addTarget(gauu); pipeline.startRendering(); output = new BitmapOutput(new BitmapOutputCallback() {
@Override public void bitmapCreated(Bitmap bitmap) { // TODO Auto-generated method stub // Bitmap will return in this. saveFileShare(bitmap); } }); gauu.addTarget(output); view.requestRender();
}
public void saveFileShare(Bitmap bm) { if (!PATH_SHARE.exists()) PATH_SHARE.mkdir(); Date dateNow = new Date(); SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd_HHmmss"); String datetime = dateFormat.format(dateNow); String imageName = datetime + ".png"; String fileImageShare = PATH_SHARE.getPath() + File.separator + imageName; FileOutputStream out = null; try { out = new FileOutputStream(fileImageShare); bm.compress(Bitmap.CompressFormat.JPEG, 80, out); } catch (Exception e) { e.printStackTrace(); } finally { try { out.close(); } catch (Throwable ignore) { } } }
Have a nice day!
Sorry, something went wrong.
Tnx a lot :)
No branches or pull requests
Hi all, I need the filtered image as Bitmap object at the end. How can I do that?
The text was updated successfully, but these errors were encountered: