title: how to convert or clip a circular image back to a square image in android?
body: <p>I have retrieved my profile picture from Facebook and displayed it in the ImageView. But before displaying it I cropped the image to a circular form. The circular image is saved in the sdcard. Now what I want to do is display this image in a square form in another ImageView which is in another activity. So is it possible to change the circular image back to square? If yes please tell me how should I do it. I have cropped the image to circle using the following codes.</p>
  
  <pre><code> Bitmap circleBitmap = Bitmap.createBitmap(bm.getWidth(), bm.getHeight(), Bitmap.Config.ARGB_8888);
  
   BitmapShader shader = new BitmapShader (bm,  TileMode.CLAMP, TileMode.CLAMP);
  
   Paint paint = new Paint();
   paint.setShader(shader);
   Canvas c = new Canvas(circleBitmap);
  
   c.drawCircle(bm.getWidth()/2, bm.getHeight()/2, bm.getWidth()/2, paint);
   paint.setAntiAlias(true);
   paint.setShadowLayer(10, 10, 5,Color.RED);
   paint.setShadowLayer(40,100 , 100,Color.RED);
   myImageView1.setImageBitmap(circleBitmap);
  </code></pre>