title: Android -There are black horns in bitmap by use drawRoundRect
body: <blockquote>
    <p>I used the below to make a  bitmap with rounded border,  But, there are black 
    horns! How do I remove it? Who can help me?</p>
  </blockquote>
  
  <pre><code>my code:
  
    public static Bitmap getRoundedCornerBitmap1(Bitmap bitmap, int color, int cornerDips, int borderDips, int size) {
  
  
          Bitmap output = Bitmap.createBitmap(bitmap.getWidth()+2*borderDips,
                  bitmap.getHeight()+2*borderDips,
                  Bitmap.Config.RGB_565);
  
          Canvas canvas = new Canvas(output);
  
          canvas.drawColor(Color.TRANSPARENT);
  
          final RectF rectF = new RectF(0, 0, output.getWidth(), output.getHeight());
          final Paint paint = new Paint();
          // prepare canvas for transfer
          paint.setAntiAlias(true);
          paint.setStrokeWidth((float) borderDips);
          paint.setColor(Color.WHITE);
          paint.setStyle(Paint.Style.FILL);
  
          canvas.drawRoundRect(rectF, borderDips, borderDips, paint);
  
          canvas.drawBitmap(bitmap, borderDips, borderDips, null);
  
          return output;
      }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/hquDw.png" rel="nofollow noreferrer">image</a></p>