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
Hello i wrote the code bellow but the issue is the result image is always Square not circle . Please let me know what i am missing.
regards
CookieCutterImageView cookieCutterImageView= (CookieCutterImageView) findViewById(R.id.ivCrop); // cookieCutterImageView.setImageURI(Base64Coverter.carImageUriCropped); cookieCutterImageView.init(); cookieCutterImageView.getParams().setShape(CookieCutterShape.CIRCLE); Button btn_cropWheel= (Button) findViewById(R.id.btn_cropWheel); btn_cropWheel.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { CookieCutterImageView cookieCutterImageView= (CookieCutterImageView) findViewById(R.id.ivCrop); Bitmap img= cookieCutterImageView.getCroppedBitmap(); ImageView img_cropedWheel= (ImageView) findViewById(R.id.img_cropedWheel); img_cropedWheel.setImageBitmap(img); FileOutputStream out = null; try { out = new FileOutputStream("/storage/emulated/0/wheel.png"); img.compress(Bitmap.CompressFormat.PNG, 100, out); } catch (Exception e) { e.printStackTrace(); } finally { try { if (out != null) { out.close(); } } catch (Exception e) { e.printStackTrace(); } }
The text was updated successfully, but these errors were encountered:
If you want to get circular image by using this then you must use this.
Bitmap bitmap = ivCrop.getCroppedBitmap(); Bitmap circularBitmap = ImageUtils.getCircularBitmap(bitmap); img_cropedWheel.setImageBitmap(circularBitmap);
This will give your image in circle. Also you don't need to use this code
cookieCutterImageView.init(); cookieCutterImageView.getParams().setShape(CookieCutterShape.CIRCLE);
comment that lines.
Thanks.
Sorry, something went wrong.
No branches or pull requests
Hello
i wrote the code bellow but the issue is the result image is always Square not circle .
Please let me know what i am missing.
regards
The text was updated successfully, but these errors were encountered: